aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/install_egg_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-10-01 11:59:36 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-10-01 11:59:36 -0400
commite6d7c40652743005e70ddec1a3e5c7466e52a313 (patch)
tree1f6836e8b8464144b7c4738de4a5c411410840b5 /setuptools/command/install_egg_info.py
parentae50b560c46773697f0f3894ac34de37fda2fadd (diff)
downloadexternal_python_setuptools-e6d7c40652743005e70ddec1a3e5c7466e52a313.tar.gz
external_python_setuptools-e6d7c40652743005e70ddec1a3e5c7466e52a313.tar.bz2
external_python_setuptools-e6d7c40652743005e70ddec1a3e5c7466e52a313.zip
Disable nspkg.pth behavior on Python 3.3+. Fixes #805 and fixes pypa/pip#1924.
Diffstat (limited to 'setuptools/command/install_egg_info.py')
-rwxr-xr-xsetuptools/command/install_egg_info.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py
index 60b615d2..7834e107 100755
--- a/setuptools/command/install_egg_info.py
+++ b/setuptools/command/install_egg_info.py
@@ -82,9 +82,10 @@ class install_egg_info(Command):
_nspkg_tmpl = (
"import sys, types, os",
+ "pep420 = sys.version_info > (3, 3)",
"p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)",
"ie = os.path.exists(os.path.join(p,'__init__.py'))",
- "m = not ie and "
+ "m = not ie and 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)",