1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
# turn jaraco.functools into a namespace package to avoid filename
# collisions with other jaraco subpackages such as .itertools
Index: python-jaraco.functools-2.0/setup.py
===================================================================
--- python-jaraco.functools-2.0.orig/setup.py
+++ python-jaraco.functools-2.0/setup.py
@@ -3,4 +3,4 @@
import setuptools
if __name__ == "__main__":
- setuptools.setup(use_scm_version=True)
+ setuptools.setup(use_scm_version=True, namespace_packages=['jaraco'], packages=setuptools.find_packages())
Index: python-jaraco.functools-2.0/jaraco/__init__.py
===================================================================
--- python-jaraco.functools-2.0.orig/jaraco/__init__.py
+++ python-jaraco.functools-2.0/jaraco/__init__.py
@@ -1 +1,8 @@
+try:
+ # the pkg_resources stanza seems necessary for setuptools
+ # which errors out if it's missing, although the namespace
+ # mechanism should work just fine without it
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ pass
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|