From b53fad8a9e4e807564d11db3ed5a75187e3e1f6c Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 29 Apr 2010 09:39:43 +0200 Subject: imply --user for install commands if installed in user-site --HG-- branch : distribute extra : rebase_source : 26878b87685bbd1b65c12763039a059937ca2228 --- setuptools/command/easy_install.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'setuptools/command/easy_install.py') 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 -- cgit v1.2.1