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
No related merge requests found
......@@ -27,12 +27,8 @@ WHEEL_NAME = re.compile(
)\.whl$""",
re.VERBOSE).match
NAMESPACE_PACKAGE_INIT = '''\
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
'''
NAMESPACE_PACKAGE_INIT = \
"__import__('pkg_resources').declare_namespace(__name__)\n"
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