summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-04-05 22:36:37 +0200
committerTarek Ziade <tarek@ziade.org>2010-04-05 22:36:37 +0200
commitc8f35c14f32aa8c074530413600386bf0bd8b55e (patch)
tree981819e7072e472878533ac6e3c7a3426303fc35 /setuptools/command
parent58ec0860c3fef3a4c1a3da60b8340a21420724bd (diff)
downloadpython-setuptools-git-c8f35c14f32aa8c074530413600386bf0bd8b55e.tar.gz
make sure site.USER_BASE is used only if python is >=2.6
--HG-- branch : distribute extra : rebase_source : aece7b87a7f0b48949f2859fa2174bfa93b04048
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/easy_install.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 5d29550d..975f70e4 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -142,8 +142,12 @@ class easy_install(Command):
self.install_data = None
self.install_base = None
self.install_platbase = None
- self.install_userbase = site.USER_BASE
- self.install_usersite = site.USER_SITE
+ if HAS_USER_SITE:
+ self.install_userbase = site.USER_BASE
+ self.install_usersite = site.USER_SITE
+ else:
+ self.install_userbase = None
+ self.install_usersite = None
self.no_find_links = None
# Options not specifiable via command line
@@ -201,7 +205,7 @@ class easy_install(Command):
# fix the install_dir if "--user" was used
#XXX: duplicate of the code in the setup command
- if self.user:
+ if self.user and HAS_USER_SITE:
self.create_home_path()
if self.install_userbase is None:
raise DistutilsPlatformError(
@@ -214,7 +218,7 @@ class easy_install(Command):
self.expand_basedirs()
self.expand_dirs()
-
+
self._expand('install_dir','script_dir','build_directory','site_dirs')
# If a non-default installation directory was specified, default the
# script directory to match it.