summaryrefslogtreecommitdiff
path: root/QMTest/TestSCons.py
diff options
context:
space:
mode:
Diffstat (limited to 'QMTest/TestSCons.py')
-rw-r--r--QMTest/TestSCons.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index 24f285a..eac25d1 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -15,7 +15,7 @@ attributes defined in this subclass.
# Copyright (c) 2001 - 2014 The SCons Foundation
from __future__ import division
-__revision__ = "QMTest/TestSCons.py 2014/07/05 09:42:21 garyo"
+__revision__ = "QMTest/TestSCons.py 2014/08/24 12:12:31 garyo"
import os
import re
@@ -34,7 +34,7 @@ from TestCmd import PIPE
# here provides some independent verification that what we packaged
# conforms to what we expect.
-default_version = '2.3.2'
+default_version = '2.3.3'
python_version_unsupported = (2, 3, 0)
python_version_deprecated = (2, 7, 0)
@@ -43,7 +43,7 @@ python_version_deprecated = (2, 7, 0)
# line must remain "__ VERSION __" (without the spaces) so the built
# version in build/QMTest/TestSCons.py contains the actual version
# string of the packages that have been built.
-SConsVersion = '2.3.2'
+SConsVersion = '2.3.3'
if SConsVersion == '__' + 'VERSION' + '__':
SConsVersion = default_version
@@ -1129,11 +1129,21 @@ SConscript( sconscript )
self.run(program = python, stdin = """\
import os, sys
try:
- py_ver = 'python%d.%d' % sys.version_info[:2]
+ if sys.platform == 'win32':
+ py_ver = 'python%d%d' % sys.version_info[:2]
+ else:
+ py_ver = 'python%d.%d' % sys.version_info[:2]
except AttributeError:
py_ver = 'python' + sys.version[:3]
-print os.path.join(sys.prefix, 'include', py_ver)
-print os.path.join(sys.prefix, 'lib', py_ver, 'config')
+# print include and lib path
+try:
+ import distutils.sysconfig
+ exec_prefix = distutils.sysconfig.EXEC_PREFIX
+ print distutils.sysconfig.get_python_inc()
+ print os.path.join(exec_prefix, 'libs')
+except:
+ print os.path.join(sys.prefix, 'include', py_ver)
+ print os.path.join(sys.prefix, 'lib', py_ver, 'config')
print py_ver
""")