Commit a20bae3d authored by Jose Fonseca's avatar Jose Fonseca

scons: Get python extensions building correctly on windows.

parent a693a299
...@@ -38,7 +38,7 @@ import os.path ...@@ -38,7 +38,7 @@ import os.path
def generate(env): def generate(env):
# See http://www.scons.org/wiki/PythonExtensions # See http://www.scons.org/wiki/PythonExtensions
if sys.platform in ['windows']: if sys.platform in ['win32']:
python_root = sys.prefix python_root = sys.prefix
python_version = '%u%u' % sys.version_info[:2] python_version = '%u%u' % sys.version_info[:2]
python_include = os.path.join(python_root, 'include') python_include = os.path.join(python_root, 'include')
...@@ -56,6 +56,8 @@ def generate(env): ...@@ -56,6 +56,8 @@ def generate(env):
cppdefines = env['CPPDEFINES'] cppdefines = env['CPPDEFINES']
cppdefines = [define for define in cppdefines if define != '_DEBUG'] cppdefines = [define for define in cppdefines if define != '_DEBUG']
env.Replace(CPPDEFINES = cppdefines) env.Replace(CPPDEFINES = cppdefines)
env.AppendUnique(CPPFLAGS = ['/U_DEBUG'])
env.AppendUnique(LINKFLAGS = ['/nodefaultlib:python25_d.lib'])
else: else:
#env.ParseConfig('python-config --cflags --ldflags --libs') #env.ParseConfig('python-config --cflags --ldflags --libs')
env.AppendUnique(CPPPATH = [distutils.sysconfig.get_python_inc()]) env.AppendUnique(CPPPATH = [distutils.sysconfig.get_python_inc()])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment