aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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