diff options
author | PJ Eby <distutils-sig@python.org> | 2005-06-12 21:47:34 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-06-12 21:47:34 +0000 |
commit | 26a5ebfbad61a20d1011dd14585f86bde34211bb (patch) | |
tree | 55e3f2f04d74ebfc0cd187be3035f74eb7b1618c /setuptools/command/bdist_egg.py | |
parent | 5bf51fa29ddefee5ff82a52b9c14420f70401779 (diff) | |
download | external_python_setuptools-26a5ebfbad61a20d1011dd14585f86bde34211bb.tar.gz external_python_setuptools-26a5ebfbad61a20d1011dd14585f86bde34211bb.tar.bz2 external_python_setuptools-26a5ebfbad61a20d1011dd14585f86bde34211bb.zip |
Add 'ez_setup' bootstrap installer. Prep for 0.4a2 release.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041054
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r-- | setuptools/command/bdist_egg.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 18001eff..cabc3350 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -10,7 +10,8 @@ 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, safe_name, safe_version +from pkg_resources import parse_requirements, get_platform, safe_name, \ + safe_version, Distribution class bdist_egg(Command): description = "create an \"egg\" distribution" @@ -34,7 +35,6 @@ class bdist_egg(Command): ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), ] - boolean_options = [ 'keep-temp', 'skip-build', 'relative','tag-date','tag-svn-revision' ] @@ -133,14 +133,14 @@ class bdist_egg(Command): ) to_compile = [] - - for ext_name in ext_outputs: + for (p,ext_name) in enumerate(ext_outputs): filename,ext = os.path.splitext(ext_name) pyfile = os.path.join(self.bdist_dir, filename + '.py') log.info("creating stub loader for %s" % ext_name) if not self.dry_run: self.write_stub(os.path.basename(ext_name), pyfile) to_compile.append(pyfile) + ext_outputs[p] = ext_name.replace(os.sep,'/') if to_compile: cmd.byte_compile(to_compile) @@ -155,18 +155,10 @@ class bdist_egg(Command): # And make an archive relative to the root of the # pseudo-installation tree. - archive_basename = "%s-%s-py%s" % ( self.egg_name.replace('-','_'), - 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. - if os.name == "os2": - archive_basename = archive_basename.replace(":", "_") - + archive_basename = Distribution( + None, None, self.egg_name, self.egg_version, get_python_version(), + ext_outputs and self.plat_name + ).egg_name() pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) archive_root = self.bdist_dir @@ -174,6 +166,7 @@ class bdist_egg(Command): egg_info = os.path.join(archive_root,'EGG-INFO') self.mkpath(egg_info) self.mkpath(self.egg_info) + log.info("writing %s" % os.path.join(self.egg_info,'PKG-INFO')) if not self.dry_run: metadata = self.distribution.metadata @@ -244,6 +237,13 @@ class bdist_egg(Command): return cmd + + + + + + + # Attribute names of options for commands that might need to be convinced to # install to the egg build directory |