diff options
| author | PJ Eby <distutils-sig@python.org> | 2005-08-22 13:40:10 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2005-08-22 13:40:10 +0000 |
| commit | b577c94170b64436919bea8e002c64623d0a9644 (patch) | |
| tree | b35c56a641742b554c66e854d6c815b978c61420 /setuptools/command/easy_install.py | |
| parent | cbccc4eafde18db71a6dc6a23ec0d39c582655d3 (diff) | |
| download | python-setuptools-git-b577c94170b64436919bea8e002c64623d0a9644.tar.gz | |
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.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041226
Diffstat (limited to 'setuptools/command/easy_install.py')
| -rwxr-xr-x | setuptools/command/easy_install.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index e0a98b62..3f754af6 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -90,6 +90,7 @@ class easy_install(Command): 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 @@ class easy_install(Command): - def finalize_options(self): # If a non-default installation directory was specified, default the # script directory to match it. @@ -224,9 +224,14 @@ class easy_install(Command): 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 @@ class easy_install(Command): - - - - - def add_output(self, path): if os.path.isdir(path): for base, dirs, files in os.walk(path): |
