diff options
author | José Fonseca <[email protected]> | 2008-07-15 12:17:35 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-07-15 17:58:48 +0900 |
commit | 9a99b19949e407528b5b40309efd344672de8f6f (patch) | |
tree | dbddae9a2b9c6ea9167687f6faeb3a67aaf060c9 /scons | |
parent | 1d03102b319f7bca2bf76c5d6e3996dc87f03634 (diff) |
python: Don't use python cflags as they conflict with existing flags.
Diffstat (limited to 'scons')
-rw-r--r-- | scons/python.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/scons/python.py b/scons/python.py index e1acc775b67..539184dd39c 100644 --- a/scons/python.py +++ b/scons/python.py @@ -31,20 +31,13 @@ Frontend-tool for Gallium3D architecture. import sys +import distutils.sysconfig import os.path def generate(env): - - # http://www.scons.org/wiki/PythonExtensions - #env.AppendUnique(CPPATH = [distutils.sysconfig.get_python_inc()]) - #distutils.sysconfig.get_config_vars('SO') - - env['SHLIBPREFIX'] = '' + # See http://www.scons.org/wiki/PythonExtensions - if sys.platform in ['linux2']: - env.ParseConfig('python-config --cflags --ldflags --libs') - if sys.platform in ['windows']: python_root = sys.prefix python_version = '%u%u' % sys.version_info[:2] @@ -55,6 +48,7 @@ def generate(env): env.Append(CPPPATH = [python_include]) env.Append(LIBPATH = [python_libs]) env.Append(LIBS = ['python' + python_version + '.lib']) + env.Replace(SHLIBPREFIX = '') env.Replace(SHLIBSUFFIX = '.pyd') # XXX; python25_d.lib is not included in Python for windows, and @@ -62,6 +56,11 @@ def generate(env): cppdefines = env['CPPDEFINES'] cppdefines = [define for define in cppdefines if define != '_DEBUG'] env.Replace(CPPDEFINES = cppdefines) + else: + #env.ParseConfig('python-config --cflags --ldflags --libs') + env.AppendUnique(CPPPATH = [distutils.sysconfig.get_python_inc()]) + env.Replace(SHLIBPREFIX = '') + env.Replace(SHLIBSUFFIX = distutils.sysconfig.get_config_vars()['SO']) # for debugging #print env.Dump() |