diff options
Diffstat (limited to 'pip/commands')
-rw-r--r-- | pip/commands/install.py | 3 | ||||
-rw-r--r-- | pip/commands/zip.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pip/commands/install.py b/pip/commands/install.py index 71ec42f51..a067f31c9 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py @@ -9,6 +9,7 @@ from pip.locations import build_prefix, src_prefix, virtualenv_no_global from pip.basecommand import Command from pip.index import PackageFinder from pip.exceptions import InstallationError, CommandError +from pip.backwardcompat import home_lib class InstallCommand(Command): @@ -276,7 +277,7 @@ class InstallCommand(Command): if options.target_dir: if not os.path.exists(options.target_dir): os.makedirs(options.target_dir) - lib_dir = os.path.join(temp_target_dir, "lib/python/") + lib_dir = home_lib(temp_target_dir) for item in os.listdir(lib_dir): shutil.move( os.path.join(lib_dir, item), diff --git a/pip/commands/zip.py b/pip/commands/zip.py index ebe1d791a..1c84210ac 100644 --- a/pip/commands/zip.py +++ b/pip/commands/zip.py @@ -231,7 +231,7 @@ class ZipCommand(Command): def add_filename_to_pth(self, filename): path = os.path.dirname(filename) - dest = os.path.join(path, filename + '.pth') + dest = filename + '.pth' if path not in self.paths(): logger.warn('Adding .pth file %s, but it is not on sys.path' % display_path(dest)) if not self.simulate: |