Commit c8f35c14 authored by Tarek Ziade's avatar Tarek Ziade

make sure site.USER_BASE is used only if python is >=2.6

--HG--
branch : distribute
extra : rebase_source : aece7b87a7f0b48949f2859fa2174bfa93b04048
parent 58ec0860
...@@ -142,8 +142,12 @@ class easy_install(Command): ...@@ -142,8 +142,12 @@ class easy_install(Command):
self.install_data = None self.install_data = None
self.install_base = None self.install_base = None
self.install_platbase = None self.install_platbase = None
self.install_userbase = site.USER_BASE if HAS_USER_SITE:
self.install_usersite = site.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 self.no_find_links = None
# Options not specifiable via command line # Options not specifiable via command line
...@@ -201,7 +205,7 @@ class easy_install(Command): ...@@ -201,7 +205,7 @@ class easy_install(Command):
# fix the install_dir if "--user" was used # fix the install_dir if "--user" was used
#XXX: duplicate of the code in the setup command #XXX: duplicate of the code in the setup command
if self.user: if self.user and HAS_USER_SITE:
self.create_home_path() self.create_home_path()
if self.install_userbase is None: if self.install_userbase is None:
raise DistutilsPlatformError( raise DistutilsPlatformError(
...@@ -214,7 +218,7 @@ class easy_install(Command): ...@@ -214,7 +218,7 @@ class easy_install(Command):
self.expand_basedirs() self.expand_basedirs()
self.expand_dirs() self.expand_dirs()
self._expand('install_dir','script_dir','build_directory','site_dirs') self._expand('install_dir','script_dir','build_directory','site_dirs')
# If a non-default installation directory was specified, default the # If a non-default installation directory was specified, default the
# script directory to match it. # script directory to match it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment