[Numpy-svn] r3902 - in trunk/numpy/distutils: . fcompiler
numpy-svn at scipy.org
numpy-svn at scipy.org
Fri Jul 27 05:02:40 EDT 2007
Author: pearu
Date: 2007-07-27 04:02:31 -0500 (Fri, 27 Jul 2007)
New Revision: 3902
Modified:
trunk/numpy/distutils/ccompiler.py
trunk/numpy/distutils/fcompiler/__init__.py
trunk/numpy/distutils/misc_util.py
Log:
Using own quote_args, trying to fix build failures with MSVC compiler.
Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py 2007-07-25 21:47:16 UTC (rev 3901)
+++ trunk/numpy/distutils/ccompiler.py 2007-07-27 09:02:31 UTC (rev 3902)
@@ -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
+from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, quote_args
# hack to set compiler optimizing options. Needs to integrated with something.
import distutils.sysconfig
@@ -367,9 +367,10 @@
ccompiler.new_compiler = new_compiler
-
_distutils_gen_lib_options = gen_lib_options
def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
+ library_dirs = quote_args(library_dirs)
+ runtime_library_dirs = quote_args(runtime_library_dirs)
r = _distutils_gen_lib_options(compiler, library_dirs,
runtime_library_dirs, libraries)
lib_opts = []
Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py 2007-07-25 21:47:16 UTC (rev 3901)
+++ trunk/numpy/distutils/fcompiler/__init__.py 2007-07-27 09:02:31 UTC (rev 3902)
@@ -603,8 +603,6 @@
def library_option(self, lib):
return "-l" + lib
def library_dir_option(self, dir):
- if ' ' in dir and dir[0] not in '"\'':
- return '-L"%s"' % (dir)
return "-L" + dir
def link(self, target_desc, objects,
Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py 2007-07-25 21:47:16 UTC (rev 3901)
+++ trunk/numpy/distutils/misc_util.py 2007-07-27 09:02:31 UTC (rev 3902)
@@ -21,8 +21,19 @@
'get_dependencies', 'is_local_src_dir', 'get_ext_source_files',
'get_script_files', 'get_lib_source_files', 'get_data_files',
'dot_join', 'get_frame', 'minrelpath','njoin',
- 'is_sequence', 'is_string', 'as_list', 'gpaths', 'get_language']
+ 'is_sequence', 'is_string', 'as_list', 'gpaths', 'get_language',
+ 'quote_args']
+def quote_args(args):
+ # don't used _nt_quote_args as it does not check if
+ # args items already have quotes.
+ args = list(args)
+ for i in range(len(args)):
+ a = args[i]
+ if ' ' in a and a[0] not in '"\'':
+ args[i] = '"%s"' % (a)
+ return args
+
def allpath(name):
"Convert a /-separated pathname to one using the OS's path separator."
splitted = name.split('/')
More information about the Numpy-svn
mailing list