Commits

Anonymous committed a0d6281

Don't install or update a ``site.py`` patch when installing to a
``PYTHONPATH`` directory with ``--multi-version``, unless an
``easy-install.pth`` file is already in use there.

(Bugfix merge from 0.7 trunk)

  • Participants
  • Parent commits 970374b
  • Branches setuptools-0.6

Comments (0)

Files changed (2)

File EasyInstall.txt

 
  * Ignore bdist_dumb distributions when looking at download URLs.
 
+ * Don't install or update a ``site.py`` patch when installing to a
+   ``PYTHONPATH`` directory with ``--multi-version``, unless an
+   ``easy-install.pth`` file is already in use there.
+
 0.6a11
  * Process ``dependency_links.txt`` if found in a distribution, by adding the
    URLs to the list for scanning.

File setuptools/command/easy_install.py

 
     def check_site_dir(self):
         """Verify that self.install_dir is .pth-capable dir, if needed"""
-
         instdir = normalize_path(self.install_dir)
         pth_file = os.path.join(instdir,'easy-install.pth')
 
         if instdir not in map(normalize_path, filter(None,PYTHONPATH)):
             # only PYTHONPATH dirs need a site.py, so pretend it's there
             self.sitepy_installed = True
-
+        elif self.multi_version and not os.path.exists(pth_file):
+            self.sitepy_installed = True    # don't need site.py in this case
+            self.pth_file = None            # and don't create a .pth file
         self.install_dir = instdir
 
-
     def cant_write_to_target(self):
         msg = """can't create or remove files in install directory
 
 
 
 
-
-
     def install_script(self, dist, script_name, script_text, dev_path=None):
         """Generate a legacy script wrapper and install it"""
         spec = str(dist.as_requirement())