|
From: <pat...@us...> - 2011-03-12 13:56:08
|
Revision: 1266
http://ggt.svn.sourceforge.net/ggt/?rev=1266&view=rev
Author: patrickh
Date: 2011-03-12 13:56:01 +0000 (Sat, 12 Mar 2011)
Log Message:
-----------
Fixed the build of PyGMTL on Mac OS X when Python is not installed as a
framework.
Submitted by: Ryan Pavlik
Modified Paths:
--------------
trunk/SConstruct
Modified: trunk/SConstruct
===================================================================
--- trunk/SConstruct 2011-01-03 01:54:22 UTC (rev 1265)
+++ trunk/SConstruct 2011-03-12 13:56:01 UTC (rev 1266)
@@ -126,7 +126,9 @@
exp = re.compile('^(.*)\/Python\.framework.*$')
m = exp.search(distutils.sysconfig.get_config_var('prefix'))
- framework_opt = '-F' + m.group(1)
+ framework_opt = None
+ if m:
+ framework_opt = '-F' + m.group(1)
CXX = os.environ.get("CXX", WhereIs('g++'))
@@ -138,8 +140,11 @@
LINK = CXX
CXXFLAGS = ['-ftemplate-depth-256', '-DBOOST_PYTHON_DYNAMIC_LIB',
- '-Wall', framework_opt, '-pipe']
+ '-Wall', '-pipe']
+ if framework_opt is not None:
+ CXXFLAGS.append(framework_opt)
+
compiler_ver = match_obj.group(1)
compiler_major_ver = int(match_obj.group(2))
compiler_minor_ver = int(match_obj.group(3))
@@ -152,7 +157,10 @@
CXXFLAGS += ['-Wno-long-double', '-no-cpp-precomp']
SHLIBSUFFIX = distutils.sysconfig.get_config_var('SO')
- SHLINKFLAGS = ['-bundle', framework_opt, '-framework', 'Python']
+ SHLINKFLAGS = ['-bundle']
+
+ if framework_opt is not None:
+ SHLINKFLAGS.extend([framework_opt, '-framework', 'Python'])
LINKFLAGS = []
# Enable profiling?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|