[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command bdist_egg.py, 1.28, 1.29 easy_install.py, 1.22, 1.23 install.py, 1.4, 1.5

pje@users.sourceforge.net pje at users.sourceforge.net
Mon Aug 22 15:40:23 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14566/setuptools/command
Modified Files:
	bdist_egg.py easy_install.py install.py 
Log Message:
Make easy_install --record strip the RPM root when building RPMs, and have
bdist_egg ignore the RPM root when building an egg. This version now can
actually run bdist_rpm to completion, although the resulting RPM will
install an egg without a corresponding .pth file.
Index: bdist_egg.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/bdist_egg.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- bdist_egg.py	14 Aug 2005 21:17:45 -0000	1.28
+++ bdist_egg.py	22 Aug 2005 13:40:10 -0000	1.29
@@ -170,7 +170,11 @@
 # pull their data path from the install_lib command.
 
 log.info("installing library code to %s" % self.bdist_dir)
+ instcmd = self.get_finalized_command('install')
+ old_root = instcmd.root
+ instcmd.root = None
 cmd = self.call_command('install_lib', warn_dir=0)
+ instcmd.root = old_root
 
 ext_outputs = cmd._mutate_outputs(
 self.distribution.has_ext_modules(), 'build_ext', 'build_lib', ''
Index: easy_install.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/easy_install.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- easy_install.py	14 Aug 2005 20:46:49 -0000	1.22
+++ easy_install.py	22 Aug 2005 13:40:10 -0000	1.23
@@ -90,6 +90,7 @@
 self.optimize = self.record = None
 self.upgrade = self.always_copy = self.multi_version = None
 self.editable = None
+ self.root = None
 
 # Options not specifiable via command line
 self.package_index = None
@@ -120,7 +121,6 @@
 
 
 
-
 def finalize_options(self):
 # If a non-default installation directory was specified, default the
 # script directory to match it.
@@ -224,9 +224,14 @@
 for spec in self.args:
 self.easy_install(spec, True)
 if self.record:
+ outputs = self.outputs
+ if self.root: # strip any package prefix
+ root_len = len(self.root)
+ for counter in xrange(len(outputs)):
+ outputs[counter] = outputs[counter][root_len:]
 from distutils import file_util
 self.execute(
- file_util.write_file, (self.record, self.outputs),
+ file_util.write_file, (self.record, outputs),
 "writing list of installed files to '%s'" %
 self.record
 )
@@ -239,11 +244,6 @@
 
 
 
-
-
-
-
-
 def add_output(self, path):
 if os.path.isdir(path):
 for base, dirs, files in os.walk(path):
Index: install.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/install.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- install.py	11 Aug 2005 14:58:54 -0000	1.4
+++ install.py	22 Aug 2005 13:40:10 -0000	1.5
@@ -23,7 +23,8 @@
 
 from setuptools.command.easy_install import easy_install
 cmd = easy_install(
- self.distribution, args="x", ignore_conflicts_at_my_risk=1
+ self.distribution, args="x", ignore_conflicts_at_my_risk=1,
+ root=self.root
 )
 cmd.ensure_finalized() # finalize before bdist_egg munges install cmd
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /