diff options
| author | ?ric Araujo <merwok@netwok.org> | 2010-08-07 18:08:29 +0200 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2010-08-07 18:08:29 +0200 |
| commit | 29c3efc2b61a7017bb2bd943a93146056104ffc4 (patch) | |
| tree | e12fe5a19deb10942c5431a84856f13e3a375576 /src/distutils2/command | |
| parent | 403091e52d2f015a6b2c656dafb36d4f1b7b1bf9 (diff) | |
| download | disutils2-29c3efc2b61a7017bb2bd943a93146056104ffc4.tar.gz | |
User site directory doesn?t exist before 2.6
Diffstat (limited to 'src/distutils2/command')
| -rw-r--r-- | src/distutils2/command/install.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/distutils2/command/install.py b/src/distutils2/command/install.py index b4df04c..6d701e1 100644 --- a/src/distutils2/command/install.py +++ b/src/distutils2/command/install.py @@ -98,11 +98,14 @@ class install(Command): 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 @@ class install(Command): 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 |
