aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-06-20 22:55:16 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-06-20 22:55:16 +0100
commit58a658b26d1c95b31d02050dcccd648d2e4ce27b (patch)
treeb9d3e7de6f6d23b91a7afecde3491e99d8cc7069 /setuptools/command/egg_info.py
parente63f3e7d864b26529d6b197e053b4084be20decf (diff)
downloadexternal_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/egg_info.py')
-rwxr-xr-xsetuptools/command/egg_info.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 46cdf4e0..9ccbe68f 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -8,11 +8,12 @@ from setuptools import Command
from distutils.errors import *
from distutils import log
from setuptools.command.sdist import sdist
+from setuptools.compat import basestring
from distutils.util import convert_path
from distutils.filelist import FileList
from pkg_resources import parse_requirements, safe_name, parse_version, \
safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename
-from sdist import walk_revctrl
+from setuptools.command.sdist import walk_revctrl
class egg_info(Command):
description = "create a distribution's .egg-info directory"
@@ -51,7 +52,7 @@ class egg_info(Command):
self.vtags = None
def save_version_info(self, filename):
- from setopt import edit_config
+ from setuptools.command.setopt import edit_config
edit_config(
filename,
{'egg_info':
@@ -220,7 +221,7 @@ class egg_info(Command):
f.close()
if data.startswith('10') or data.startswith('9') or data.startswith('8'):
- data = map(str.splitlines,data.split('\n\x0c\n'))
+ data = list(map(str.splitlines,data.split('\n\x0c\n')))
del data[0][0] # get rid of the '8' or '9' or '10'
dirurl = data[0][3]
localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0])
@@ -386,7 +387,8 @@ def write_pkg_info(cmd, basename, filename):
metadata.name, metadata.version = oldname, oldver
safe = getattr(cmd.distribution,'zip_safe',None)
- import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe)
+ from setuptools.command import bdist_egg
+ bdist_egg.write_safety_flag(cmd.egg_info, safe)
def warn_depends_obsolete(cmd, basename, filename):
if os.path.exists(filename):