summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-05-21 19:22:43 +0200
committerRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2010-05-21 19:22:43 +0200
commit20e69c3ec40f70022c4b30d2e80acd46909e74eb (patch)
treefcdc04f61911f450b34a28e4fff8e4266ac68047 /setuptools/command/easy_install.py
parentfb9eb090a3d884c7da7439239eb398160845aa00 (diff)
downloadpython-setuptools-bitbucket-20e69c3ec40f70022c4b30d2e80acd46909e74eb.tar.gz
make HAS_USER_SITE depend on site.ENABLE_USER_SITE
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index d68943fa..a41841b3 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -39,7 +39,7 @@ __all__ = [
]
import site
-HAS_USER_SITE = not sys.version < "2.6"
+HAS_USER_SITE = not sys.version < "2.6" and site.ENABLE_USER_SITE
def samefile(p1,p2):
if hasattr(os.path,'samefile') and (
@@ -122,7 +122,7 @@ class easy_install(Command):
create_index = PackageIndex
def initialize_options(self):
- if HAS_USER_SITE and site.ENABLE_USER_SITE:
+ if HAS_USER_SITE:
whereami = os.path.abspath(__file__)
self.user = whereami.startswith(site.USER_SITE)
else:
@@ -1347,8 +1347,7 @@ def get_site_dirs():
site_lib = get_python_lib(plat_specific)
if site_lib not in sitedirs: sitedirs.append(site_lib)
- if sys.version >= "2.6":
- import site
+ if HAS_USER_SITE:
sitedirs.append(site.USER_SITE)
sitedirs = map(normalize_path, sitedirs)