[Python-checkins] r46725 - sandbox/trunk/setuptools/setuptools/command/easy_install.py

phillip.eby python-checkins at python.org
Wed Jun 7 22:05:53 CEST 2006


Author: phillip.eby
Date: Wed Jun 7 22:05:52 2006
New Revision: 46725
Modified:
 sandbox/trunk/setuptools/setuptools/command/easy_install.py
Log:
Fix local --find-links eggs not being copied except with --always-copy.
Modified: sandbox/trunk/setuptools/setuptools/command/easy_install.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/easy_install.py	(original)
+++ sandbox/trunk/setuptools/setuptools/command/easy_install.py	Wed Jun 7 22:05:52 2006
@@ -452,12 +452,22 @@
 def install_item(self, spec, download, tmpdir, deps, install_needed=False):
 
 # Installation is also needed if file in tmpdir or is not an egg
+ install_needed = install_needed or self.always_copy
 install_needed = install_needed or os.path.dirname(download) == tmpdir
 install_needed = install_needed or not download.endswith('.egg')
 
+ if spec and not install_needed:
+ # at this point, we know it's a local .egg, we just don't know if
+ # it's already installed.
+ for dist in self.local_index[spec.project_name]:
+ if dist.location==download:
+ break
+ else:
+ install_needed = True # it's not in the local index
+
 log.info("Processing %s", os.path.basename(download))
 
- if install_needed or self.always_copy:
+ if install_needed:
 dists = self.install_eggs(spec, download, tmpdir)
 for dist in dists:
 self.process_distribution(spec, dist, deps)
@@ -480,16 +490,6 @@
 
 
 
-
-
-
-
-
-
-
-
-
-
 def process_distribution(self, requirement, dist, deps=True, *info):
 self.update_pth(dist)
 self.package_index.add(dist)


More information about the Python-checkins mailing list

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