diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-03-18 18:02:10 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-03-18 18:02:10 +0100 |
commit | ab214d20c38736bce62fb09bb9c666ecf2f0c9b7 (patch) | |
tree | 1e51c88c4b1e6b1f9d99a08a2dbfed663e2a354e /src | |
parent | 474e4afe97d6510a94c7bd0ed9ae4b6dda4efb60 (diff) | |
download | pyexiv2-ab214d20c38736bce62fb09bb9c666ecf2f0c9b7.tar.gz |
Do not add the --user switch for Python < 2.6.
Diffstat (limited to 'src')
-rw-r--r-- | src/SConscript | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/SConscript b/src/SConscript index af0e4cb..3099b3d 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- import os +import site from distutils.sysconfig import get_python_inc, get_python_lib -from site import USER_SITE import SCons.Util env = Environment() @@ -33,14 +33,19 @@ env.Alias('lib', libpyexiv2) # Install the shared library and the Python modules, invoked with # 'scons install'. -if GetOption('user'): +try: + user_site = GetOption('user') +except AttributeError: + user_site = False + +if user_site: # Install in the current user site directory. # See http://www.python.org/dev/peps/pep-0370/ for reference. - install_dir = USER_SITE + install_dir = site.USER_SITE else: python_lib_path = get_python_lib(plat_specific=True) # If DESTDIR is specified on the command line when invoking - # scons, it will be prepended to each installed target file. See + # scons, its value will be prepended to each installed target file. See # http://www.gnu.org/prep/standards/html_node/DESTDIR.html for reference. dest_dir = ARGUMENTS.get('DESTDIR') if dest_dir is None or not os.path.isabs(dest_dir): |