diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-20 22:55:16 +0100 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-20 22:55:16 +0100 |
commit | 58a658b26d1c95b31d02050dcccd648d2e4ce27b (patch) | |
tree | b9d3e7de6f6d23b91a7afecde3491e99d8cc7069 /setuptools/command/bdist_egg.py | |
parent | e63f3e7d864b26529d6b197e053b4084be20decf (diff) | |
download | external_python_setuptools-58a658b26d1c95b31d02050dcccd648d2e4ce27b.tar.gz external_python_setuptools-58a658b26d1c95b31d02050dcccd648d2e4ce27b.tar.bz2 external_python_setuptools-58a658b26d1c95b31d02050dcccd648d2e4ce27b.zip |
Changes to support 2.x and 3.x in the same codebase.
--HG--
branch : distribute
extra : rebase_source : 7d3608edee54a43789f0574d702fb839628b5071
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r-- | setuptools/command/bdist_egg.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 68ca15c7..007f3ba9 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -17,6 +17,7 @@ from distutils.errors import DistutilsSetupError from pkg_resources import get_build_platform, Distribution, ensure_directory from pkg_resources import EntryPoint from types import CodeType +from setuptools.compat import basestring, next from setuptools.extension import Library def strip_module(filename): @@ -379,7 +380,7 @@ NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split()) def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = os.walk(egg_dir) - base,dirs,files = walker.next() + base,dirs,files = next(walker) if 'EGG-INFO' in dirs: dirs.remove('EGG-INFO') yield base,dirs,files @@ -407,7 +408,7 @@ def write_safety_flag(egg_dir, safe): for flag,fn in safety_flags.items(): fn = os.path.join(egg_dir, fn) if os.path.exists(fn): - if safe is None or bool(safe)<>flag: + if safe is None or bool(safe) != flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: f=open(fn,'wt'); f.write('\n'); f.close() |