[Numpy-svn] r3911 - trunk/numpy/distutils

numpy-svn@scip... numpy-svn@scip...
Fri Jul 27 17:32:46 CDT 2007


Author: pearu
Date: 2007-07-27 17:32:40 -0500 (Fri, 27 Jul 2007)
New Revision: 3911

Modified:
   trunk/numpy/distutils/ccompiler.py
   trunk/numpy/distutils/misc_util.py
Log:
msvc_on_amd64 must be applied *after* importing ccompiler module, apply quote_args also to include_dirs.

Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py	2007-07-27 22:09:23 UTC (rev 3910)
+++ trunk/numpy/distutils/ccompiler.py	2007-07-27 22:32:40 UTC (rev 3911)
@@ -10,7 +10,7 @@
 
 from numpy.distutils import log
 from numpy.distutils.exec_command import exec_command
-from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, quote_args
+from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, quote_args, msvc_on_amd64
 
 # hack to set compiler optimizing options. Needs to integrated with something.
 import distutils.sysconfig
@@ -383,6 +383,11 @@
     return lib_opts
 ccompiler.gen_lib_options = gen_lib_options
 
+_distutils_gen_preprocess_options = gen_preprocess_options
+def gen_preprocess_options (macros, include_dirs):
+    include_dirs = quote_args(include_dirs)
+    return _distutils_gen_preprocess_options(macros, include_dirs)
+ccompiler.gen_preprocess_options = gen_preprocess_options
 
 ##Fix distutils.util.split_quoted:
 import re,string
@@ -440,3 +445,6 @@
 
     return words
 ccompiler.split_quoted = split_quoted
+
+# define DISTUTILS_USE_SDK when necessary to workaround distutils/msvccompiler.py bug
+msvc_on_amd64()

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2007-07-27 22:09:23 UTC (rev 3910)
+++ trunk/numpy/distutils/misc_util.py	2007-07-27 22:32:40 UTC (rev 3911)
@@ -333,8 +333,6 @@
     os.environ['DISTUTILS_USE_SDK']='1'
     return
 
-msvc_on_amd64()
-
 #########################
 
 #XXX need support for .C that is also C++



More information about the Numpy-svn mailing list