aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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