[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command bdist_egg.py, 1.15, 1.16
pje@users.sourceforge.net
pje at users.sourceforge.net
Sun Jun 12 23:47:45 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29239/setuptools/command
Modified Files:
bdist_egg.py
Log Message:
Add 'ez_setup' bootstrap installer. Prep for 0.4a2 release.
Index: bdist_egg.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/bdist_egg.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- bdist_egg.py 12 Jun 2005 15:49:54 -0000 1.15
+++ bdist_egg.py 12 Jun 2005 21:47:34 -0000 1.16
@@ -10,7 +10,8 @@
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 @@
('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 @@
)
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 @@
# 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 @@
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 @@
return cmd
+
+
+
+
+
+
+
# Attribute names of options for commands that might need to be convinced to
# install to the egg build directory
More information about the Python-checkins
mailing list