[Python-checkins] distutils2: User site directory doesn?t exist before 2.6
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:48 CEST 2010
tarek.ziade pushed 950793edbee0 to distutils2:
http://hg.python.org/distutils2/rev/950793edbee0
changeset: 513:950793edbee0
user: ?ric Araujo <merwok at netwok.org>
date: Sat Aug 07 18:08:29 2010 +0200
summary: User site directory doesn?t exist before 2.6
files: src/distutils2/command/install.py
diff --git a/src/distutils2/command/install.py b/src/distutils2/command/install.py
--- a/src/distutils2/command/install.py
+++ b/src/distutils2/command/install.py
@@ -98,11 +98,14 @@
boolean_options = ['compile', 'force', 'skip-build', 'no-distinfo',
'requested', 'no-record']
- user_options.append(('user', None,
- "install in user site-package '%s'" % \
- get_path('purelib', '%s_user' % os.name)))
- boolean_options.append('user')
negative_opt = {'no-compile' : 'compile', 'no-requested': 'requested'}
+ if sys.version >= '2.6':
+ user_options.append(
+ ('user', None,
+ "install in user site-package [%s]" %
+ get_path('purelib', '%s_user' % os.name)))
+
+ boolean_options.append('user')
def initialize_options(self):
@@ -112,6 +115,8 @@
self.prefix = None
self.exec_prefix = None
self.home = None
+ # This attribute is used all over the place, so it's best to
+ # define it even in < 2.6
self.user = 0
# These select only the installation base; it's up to the user to
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list