From 712a6d85e47979ac50a1fb32d2cc76dc61acade8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 7 Nov 2016 04:18:56 -0500 Subject: 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. --- setuptools/namespaces.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'setuptools/namespaces.py') 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)", -- cgit v1.2.3