aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-10-19 10:07:18 +0200
committerOlivier Tilloy <olivier@fluendo.com>2009-10-19 10:07:18 +0200
commit2381f2872e584c23d69f892d6d4601492bf9eab8 (patch)
tree6f406124d6d624e52659c9c239ef0313152131b2
parent182d0a273a41b1f099368605f127b777e07f9a5f (diff)
downloadpyexiv2-2381f2872e584c23d69f892d6d4601492bf9eab8.tar.gz
Use distutils.sysconfig to determine to python include and lib paths.
-rw-r--r--src/SConscript7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/SConscript b/src/SConscript
index cc40ec3..249fa27 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1,15 +1,14 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-import sys
import os.path
from glob import glob
+from distutils.sysconfig import get_python_inc, get_python_lib
env = Environment()
# Include directories to look for 'Python.h' in
-python_inc_path = os.path.join(sys.prefix, 'include', 'python' + sys.version[:3])
-env.Append(CPPPATH=[python_inc_path])
+env.Append(CPPPATH=[get_python_inc()])
# Libraries to link against
libs = ['boost_python', 'exiv2']
@@ -23,7 +22,7 @@ libpyexiv2 = env.SharedLibrary('exiv2python', cpp_sources)
# 'scons install'. If DESTDIR is specified on the command line when invoking
# scons, it will be prepended to each installed target file. See
# http://www.gnu.org/prep/standards/html_node/DESTDIR.html for reference.
-python_lib_path = os.path.join(sys.prefix, 'lib', 'python' + sys.version[:3], 'site-packages')
+python_lib_path = get_python_lib()
dest_dir = ARGUMENTS.get('DESTDIR')
if (dest_dir is None) or (not os.path.isabs(dest_dir)):
install_dir = python_lib_path