Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added backportsclone test package to test bug #6.
- Loading branch information
1 parent
1d559ef
commit 6780b5c
Showing
4 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# -*- coding: utf-8 -*- | ||
from distutils.core import setup | ||
setup(name='backportsclone', | ||
version='1.0', | ||
description='Namespace for backported Python features', | ||
long_description=u"""\ | ||
Copy of the empty backports package. | ||
See https://pypi.org/project/backports/ | ||
and code: https://bitbucket.org/brandon/backports | ||
I (Maurits van Rees) am seeing problems in z3c.autoinclude with this. | ||
See https://github.com/zopefoundation/z3c.autoinclude/issues/6 | ||
So I copied it to backportsclone so I can test with it. | ||
To continue a part of the original readme: | ||
Building your own backports module | ||
---------------------------------- | ||
Placing a module of your own inside of the ``backports`` namespace | ||
requires only a few simple steps. First, set your project up like:: | ||
project/ | ||
project/setup.py | ||
project/backports/ | ||
project/backports/__init__.py <--- SPECIAL - see below! | ||
project/backports/yourpkg/ | ||
project/backports/yourpkg/__init__.py | ||
project/backports/yourpkg/foo.py | ||
project/backports/yourpkg/bar.py | ||
This places your own package inside of the ``backports`` namespace, | ||
so your package and its modules can be imported like this:: | ||
import backports.yourpkg | ||
import backports.yourpkg.foo | ||
The one **absolutely essential rule** is that the ``__init__.py`` inside | ||
of the ``backports`` directory itself **must** have the following code | ||
as its content:: | ||
# A Python "namespace package" http://www.python.org/dev/peps/pep-0382/ | ||
# This always goes inside of a namespace package's __init__.py | ||
from pkgutil import extend_path | ||
__path__ = extend_path(__path__, __name__) | ||
If you fail to include this code, then the namespace package might fail | ||
to see all of the packages beneath it, and ``import`` statements might | ||
return errors. | ||
A live example of a package that implements all of this can be | ||
downloaded from the Python Package Index: | ||
http://pypi.python.org/pypi/backports.ssl_match_hostname/3.2a3 | ||
""", | ||
author='Brandon Craig Rhodes and Maurits van Rees', | ||
author_email='info@example.org', | ||
url='http://bitbucket.org/brandon/backports', | ||
# packages=['backportsclone'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters