瀏覽代碼

USE_DEBUG_PYTHON

David Rose 20 年之前
父節點
當前提交
20b5398ab8
共有 4 個文件被更改,包括 8 次插入3 次删除
  1. 2 2
      direct/src/ffi/genPyCode.pp
  2. 4 0
      dtool/Config.pp
  3. 1 0
      dtool/LocalSetup.pp
  4. 1 1
      dtool/src/interrogatedb/py_panda.h

+ 2 - 2
direct/src/ffi/genPyCode.pp

@@ -14,7 +14,7 @@
 #define install_igatedb_dir $[or $[INSTALL_IGATEDB_DIR],$[install_dir]/etc]
 #define install_igatedb_dir $[or $[INSTALL_IGATEDB_DIR],$[install_dir]/etc]
 
 
 #define python $[PYTHON_COMMAND]
 #define python $[PYTHON_COMMAND]
-#if $[< $[OPTIMIZE],3]
+#if $[USE_DEBUG_PYTHON]
   #define python $[PYTHON_DEBUG_COMMAND]
   #define python $[PYTHON_DEBUG_COMMAND]
 #endif
 #endif
 
 
@@ -58,7 +58,7 @@ $[python] -u '$[osfilename $[install_bin_dir]/genPyCode.py]' "$@"
 #endif  // Win32
 #endif  // Win32
 
 
 #output genPyCode.py
 #output genPyCode.py
-#! /usr/bin/env python
+#! /usr/bin/env $[python]
 #### Generated automatically by $[PPREMAKE] $[PPREMAKE_VERSION] from $[notdir $[THISFILENAME]].
 #### Generated automatically by $[PPREMAKE] $[PPREMAKE_VERSION] from $[notdir $[THISFILENAME]].
 ################################# DO NOT EDIT ###########################
 ################################# DO NOT EDIT ###########################
 
 

+ 4 - 0
dtool/Config.pp

@@ -269,6 +269,10 @@
 #define PYTHON_FRAMEWORK
 #define PYTHON_FRAMEWORK
 #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
 #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
 
 
+// By default, we'll assume the user only wants to run with Debug
+// python if he has to--that is, on Windows when building a debug build.
+#defer USE_DEBUG_PYTHON $[and $[< $[OPTIMIZE],3],$[WINDOWS_PLATFORM]]
+
 // Define the default set of libraries to be instrumented by
 // Define the default set of libraries to be instrumented by
 // genPyCode.  You may wish to add to this list to add your own
 // genPyCode.  You may wish to add to this list to add your own
 // libraries, or if you want to use some of the more obscure
 // libraries, or if you want to use some of the more obscure

+ 1 - 0
dtool/LocalSetup.pp

@@ -118,6 +118,7 @@
 
 
 /* Define if we have Python installed.  */
 /* Define if we have Python installed.  */
 $[cdefine HAVE_PYTHON]
 $[cdefine HAVE_PYTHON]
+$[cdefine USE_DEBUG_PYTHON]
 /* Define if we have Python as a framework (Mac OS X).  */
 /* Define if we have Python as a framework (Mac OS X).  */
 $[cdefine PYTHON_FRAMEWORK]
 $[cdefine PYTHON_FRAMEWORK]
 
 

+ 1 - 1
dtool/src/interrogatedb/py_panda.h

@@ -32,7 +32,7 @@
 #include <map>
 #include <map>
 #include <string>
 #include <string>
 
 
-#ifdef _DEBUG
+#ifdef USE_DEBUG_PYTHON
 #define  Py_DEBUG
 #define  Py_DEBUG
 #endif
 #endif