aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/install_egg_info.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2009-09-11 23:23:25 +0200
committerMartin v. Löwis <martin@v.loewis.de>2009-09-11 23:23:25 +0200
commit7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e (patch)
treebc74b155cb5c056ae3d89332728a94b18b1380d7 /setuptools/command/install_egg_info.py
parent6badc540234386ca7a27d3c90b22c565472475f1 (diff)
downloadexternal_python_setuptools-7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e.tar.gz
external_python_setuptools-7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e.tar.bz2
external_python_setuptools-7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e.zip
Use types.ModuleType instead of new.module.
--HG-- branch : distribute extra : rebase_source : 3327441a867ad2878553ed1d42418a7e68ee3067
Diffstat (limited to 'setuptools/command/install_egg_info.py')
-rwxr-xr-xsetuptools/command/install_egg_info.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py
index 939340c5..00c81221 100755
--- a/setuptools/command/install_egg_info.py
+++ b/setuptools/command/install_egg_info.py
@@ -97,12 +97,12 @@ class install_egg_info(Command):
% ('.'.join(pth[:-1]), pth[-1])
)
f.write(
- "import sys,new,os; "
+ "import sys,types,os; "
"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 "
- "sys.modules.setdefault(%(pkg)r,new.module(%(pkg)r)); "
+ "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)%(trailer)s"
% locals()