aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/namespaces.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-11-07 04:18:56 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-11-07 04:18:56 -0500
commit712a6d85e47979ac50a1fb32d2cc76dc61acade8 (patch)
treed55baa5a3166b698b5d963aa45031c0c164d630c /setuptools/namespaces.py
parentd580f089b95b58a9a414faa8ed35419e71c995e1 (diff)
downloadexternal_python_setuptools-712a6d85e47979ac50a1fb32d2cc76dc61acade8.tar.gz
external_python_setuptools-712a6d85e47979ac50a1fb32d2cc76dc61acade8.tar.bz2
external_python_setuptools-712a6d85e47979ac50a1fb32d2cc76dc61acade8.zip
In -nspkg.pth, always add the path to the namespace package, even if a __init__ exists, allowing for better cooperation between PEP 420 packages and older, __init__ namespace packages.
Diffstat (limited to 'setuptools/namespaces.py')
-rwxr-xr-xsetuptools/namespaces.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py
index a6371c99..93d358a2 100755
--- a/setuptools/namespaces.py
+++ b/setuptools/namespaces.py
@@ -45,8 +45,7 @@ class Installer:
"import sys, types, os",
"pep420 = sys.version_info > (3, 3)",
"p = os.path.join(%(root)s, *%(pth)r)",
- "ie = os.path.exists(os.path.join(p,'__init__.py'))",
- "m = not ie and not pep420 and "
+ "m = not pep420 and "
"sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))",
"mp = (m or []) and m.__dict__.setdefault('__path__',[])",
"(p not in mp) and mp.append(p)",