diff options
-rw-r--r-- | setuptools/command/bdist_egg.py | 4 | ||||
-rwxr-xr-x | setuptools/command/easy_install.py | 14 | ||||
-rw-r--r-- | setuptools/command/install.py | 3 |
3 files changed, 13 insertions, 8 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index eb92bd24..1f17bb82 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -170,7 +170,11 @@ class bdist_egg(Command): # 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', '' 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): diff --git a/setuptools/command/install.py b/setuptools/command/install.py index f438dda6..c555e7e0 100644 --- a/setuptools/command/install.py +++ b/setuptools/command/install.py @@ -23,7 +23,8 @@ class install(_install): 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 |