diff options
author | PJ Eby <distutils-sig@python.org> | 2005-06-05 18:59:37 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-06-05 18:59:37 +0000 |
commit | 0c9e886999bb42cf825054778b1664e41f8164b4 (patch) | |
tree | c2b0f62ab2390372d3fe5ecb42f0246bf8e2abf5 /setuptools/command/bdist_egg.py | |
parent | 992e379c8850a2a23da24e5586799f7ba933e692 (diff) | |
download | external_python_setuptools-0c9e886999bb42cf825054778b1664e41f8164b4.tar.gz external_python_setuptools-0c9e886999bb42cf825054778b1664e41f8164b4.tar.bz2 external_python_setuptools-0c9e886999bb42cf825054778b1664e41f8164b4.zip |
Add "safe_name" and "safe_version" functions to allow sanitizing of
distribution names and versions in arbitrary packages that might be built
using EasyInstall.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041040
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r-- | setuptools/command/bdist_egg.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index d3139580..8692fd39 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -10,7 +10,7 @@ from distutils.dir_util import create_tree, remove_tree, ensure_relative,mkpath from distutils.sysconfig import get_python_version, get_python_lib from distutils.errors import * from distutils import log -from pkg_resources import parse_requirements, get_platform +from pkg_resources import parse_requirements, get_platform, safe_name, safe_version class bdist_egg(Command): description = "create an \"egg\" distribution" @@ -54,7 +54,7 @@ class bdist_egg(Command): self.tag_date = 0 def finalize_options (self): - self.egg_name = self.distribution.get_name().replace(' ','-') + self.egg_name = safe_name(self.distribution.get_name()) self.egg_version = self.tagged_version() try: list( @@ -122,7 +122,6 @@ class bdist_egg(Command): self.distribution.data_files = old def run(self): - if not self.skip_build: self.run_command('build') @@ -161,6 +160,7 @@ class bdist_egg(Command): self.egg_version.replace('-','_'), get_python_version()) if ext_outputs: archive_basename += "-" + self.plat_name + ext_outputs = [out.replace(os.sep,'/') for out in ext_outputs] # OS/2 objects to any ":" characters in a filename (such as when # a timestamp is used in a version) so change them to underscores. @@ -223,7 +223,7 @@ class bdist_egg(Command): import time version += time.strftime("-%Y%m%d") - return version + return safe_version(version) def get_svn_revision(self): stdin, stdout = os.popen4("svn info"); stdin.close() |