Mesa (master): scons: Get python extensions building correctly on windows.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Mon Mar 30 13:11:10 UTC 2009


Module: Mesa
Branch: master
Commit: a20bae3d17a812a5144553963174191288457cf7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a20bae3d17a812a5144553963174191288457cf7

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Mar 30 12:12:20 2009 +0100

scons: Get python extensions building correctly on windows.

---

 scons/python.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/scons/python.py b/scons/python.py
index 539184d..9e94d05 100644
--- a/scons/python.py
+++ b/scons/python.py
@@ -38,7 +38,7 @@ import os.path
 def generate(env):
     # See http://www.scons.org/wiki/PythonExtensions
     
-    if sys.platform in ['windows']:
+    if sys.platform in ['win32']:
         python_root = sys.prefix
         python_version = '%u%u' % sys.version_info[:2]
         python_include = os.path.join(python_root, 'include')
@@ -56,6 +56,8 @@ def generate(env):
         cppdefines = env['CPPDEFINES']
         cppdefines = [define for define in cppdefines if define != '_DEBUG']
         env.Replace(CPPDEFINES = cppdefines)
+        env.AppendUnique(CPPFLAGS = ['/U_DEBUG'])
+        env.AppendUnique(LINKFLAGS = ['/nodefaultlib:python25_d.lib'])
     else:
         #env.ParseConfig('python-config --cflags --ldflags --libs')
         env.AppendUnique(CPPPATH = [distutils.sysconfig.get_python_inc()])




More information about the mesa-commit mailing list