summaryrefslogtreecommitdiffstats
path: root/QMTest
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-09-16 16:29:29 (GMT)
committerSteven Knight <knight@baldmt.com>2008-09-16 16:29:29 (GMT)
commit7dc5ca14d9985e6661d4504dc29b937698858413 (patch)
tree614beb7c8267c8929f5dad4996f324b22e3c41b3 /QMTest
parent2f9422bcda43ef2f2abb20ad543008908268fa1b (diff)
downloadSCons-7dc5ca14d9985e6661d4504dc29b937698858413.zip
SCons-7dc5ca14d9985e6661d4504dc29b937698858413.tar.gz
SCons-7dc5ca14d9985e6661d4504dc29b937698858413.tar.bz2
Make the framework library path we return on Mac OS X match the framework
paths for executables and headers, so tests like test/SWIG/live.py work even if there are multiple Python versions installed with frameworks in different locations.
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestSCons.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index d3a57d0..c7332fa 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -958,7 +958,7 @@ print "self._msvs_versions =", str(env['MSVS']['VERSIONS'])
framework we link against, or else we get interpreter errors.
"""
if sys.platform[:6] == 'darwin':
- return '/System/Library/Frameworks/Python.framework/Versions/Current/bin/python'
+ return sys.prefix + '/bin/python'
else:
global python
return python
@@ -1012,7 +1012,7 @@ print "self._msvs_versions =", str(env['MSVS']['VERSIONS'])
so we must link to it using Apple's 'framework' scheme.
"""
if sys.platform[:6] == 'darwin':
- return '/System/Library/Frameworks/Python.framework/Headers'
+ return sys.prefix + '/Headers'
try:
import distutils.sysconfig
except ImportError:
@@ -1025,17 +1025,18 @@ print "self._msvs_versions =", str(env['MSVS']['VERSIONS'])
"""
Returns the full path of the Python static library (libpython*.a)
"""
+ if sys.platform[:6] == 'darwin':
+ # Use the framework version (or try to) since that matches
+ # the executable and headers we return elsewhere.
+ python_lib = os.path.join(sys.prefix, 'Python')
+ if os.path.exists(python_lib):
+ return python_lib
python_version = self.get_python_version()
python_lib = os.path.join(sys.prefix, 'lib',
'python%s' % python_version, 'config',
'libpython%s.a' % python_version)
if os.path.exists(python_lib):
return python_lib
- # The library usually exists on OS X as above,
- # but fall back to the framework layout just in case
- python_lib = os.path.join(sys.prefix, 'Python')
- if os.path.exists(python_lib):
- return python_lib
# We can't find it, so maybe it's in the standard path
return ''