aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-05-23 19:12:03 +0000
committerPJ Eby <distutils-sig@python.org>2006-05-23 19:12:03 +0000
commitb15bbd8171e9bed8deb3e8d615672e9564dc582f (patch)
tree55284cf217982137516c4a663bc7673b1c5b8630 /setuptools/command/easy_install.py
parent8b0978b8a9fcf1dcef7b6934d8cc20cf5906c05e (diff)
downloadexternal_python_setuptools-b15bbd8171e9bed8deb3e8d615672e9564dc582f.tar.gz
external_python_setuptools-b15bbd8171e9bed8deb3e8d615672e9564dc582f.tar.bz2
external_python_setuptools-b15bbd8171e9bed8deb3e8d615672e9564dc582f.zip
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) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4046143
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index b7a30a11..8f256fd3 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -246,7 +246,6 @@ class easy_install(Command):
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')
@@ -281,10 +280,11 @@ class easy_install(Command):
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
@@ -572,8 +572,6 @@ Please make the appropriate changes for your system and try again.
-
-
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())