Commit 3b32ab28 authored by Jason R. Coombs's avatar Jason R. Coombs

In wheel-to-egg conversion, use simple pkg_resources-style namespace...

In wheel-to-egg conversion, use simple pkg_resources-style namespace declaration for packages that declare namespace_packages. Fixes #2070.
parent 7339f2c1
...@@ -27,12 +27,8 @@ WHEEL_NAME = re.compile( ...@@ -27,12 +27,8 @@ WHEEL_NAME = re.compile(
)\.whl$""", )\.whl$""",
re.VERBOSE).match re.VERBOSE).match
NAMESPACE_PACKAGE_INIT = '''\ NAMESPACE_PACKAGE_INIT = \
try: "__import__('pkg_resources').declare_namespace(__name__)\n"
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
'''
def unpack(src_dir, dst_dir): def unpack(src_dir, dst_dir):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment