Commits

Tarek Ziadé committed 013057c

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

Comments (0)

Files changed (1)

setuptools/command/easy_install.py

         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
 
         # 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(
 
         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.