aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-04-29 09:39:43 +0200
committerRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-04-29 09:39:43 +0200
commitb53fad8a9e4e807564d11db3ed5a75187e3e1f6c (patch)
treed25c06e0b2b894ce8e9cd5e136d380036c3fbb37
parent4331740bfbdc6e148808375c406dab795ae43d9b (diff)
downloadexternal_python_setuptools-b53fad8a9e4e807564d11db3ed5a75187e3e1f6c.tar.gz
external_python_setuptools-b53fad8a9e4e807564d11db3ed5a75187e3e1f6c.tar.bz2
external_python_setuptools-b53fad8a9e4e807564d11db3ed5a75187e3e1f6c.zip
imply --user for install commands if installed in user-site
--HG-- branch : distribute extra : rebase_source : 26878b87685bbd1b65c12763039a059937ca2228
-rwxr-xr-xsetuptools/command/easy_install.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 2d854755..7af42c65 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -122,7 +122,13 @@ class easy_install(Command):
create_index = PackageIndex
def initialize_options(self):
- self.user = 0
+ if HAS_USER_SITE:
+ whereami = os.path.abspath(__file__)
+ self.user = (whereami.startswith(site.USER_SITE)
+ or whereami.startswith(site.USER_BASE))
+ else:
+ self.user = 0
+
self.zip_ok = self.local_snapshots_ok = None
self.install_dir = self.script_dir = self.exclude_scripts = None
self.index_url = None