[Numpy-svn] r3899 - in trunk/numpy/distutils: . fcompiler
numpy-svn at scipy.org
numpy-svn at scipy.org
Wed Jul 25 07:21:53 EDT 2007
Author: pearu
Date: 2007-07-25 06:21:35 -0500 (Wed, 25 Jul 2007)
New Revision: 3899
Modified:
trunk/numpy/distutils/ccompiler.py
trunk/numpy/distutils/fcompiler/__init__.py
trunk/numpy/distutils/fcompiler/gnu.py
Log:
Don't use _nt_quote_args as exec_command should
handle spaces in program path. This fixes building
numpy/scipy on Windows using mingw32 g77 with full
path=C:\Program Files\MinGW\g77.exe.
Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py 2007-07-25 09:02:55 UTC (rev 3898)
+++ trunk/numpy/distutils/ccompiler.py 2007-07-25 11:21:35 UTC (rev 3899)
@@ -11,7 +11,6 @@
from numpy.distutils import log
from numpy.distutils.exec_command import exec_command
from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32
-from distutils.spawn import _nt_quote_args
# hack to set compiler optimizing options. Needs to integrated with something.
import distutils.sysconfig
@@ -32,8 +31,6 @@
if is_sequence(display):
display = ' '.join(list(display))
log.info(display)
- if is_sequence(cmd) and os.name == 'nt':
- cmd = _nt_quote_args(list(cmd))
s,o = exec_command(cmd)
if s:
if is_sequence(cmd):
@@ -264,7 +261,6 @@
return None
if not version_cmd or not version_cmd[0]:
return None
- cmd = ' '.join(version_cmd)
try:
matcher = self.version_match
except AttributeError:
@@ -279,7 +275,7 @@
version = m.group('version')
return version
- status, output = exec_command(cmd,use_tee=0)
+ status, output = exec_command(version_cmd,use_tee=0)
version = None
if status in ok_status:
Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py 2007-07-25 09:02:55 UTC (rev 3898)
+++ trunk/numpy/distutils/fcompiler/__init__.py 2007-07-25 11:21:35 UTC (rev 3899)
@@ -30,7 +30,6 @@
from distutils.errors import DistutilsModuleError, \
DistutilsExecError, CompileError, LinkError, DistutilsPlatformError
from distutils.util import split_quoted, strtobool
-from distutils.spawn import _nt_quote_args
from numpy.distutils.ccompiler import CCompiler, gen_lib_options
from numpy.distutils import log
@@ -569,8 +568,6 @@
log.info('using compile options from source: %r' \
% ' '.join(extra_flags))
- if os.name == 'nt':
- compiler = _nt_quote_args(compiler)
command = compiler + cc_args + extra_flags + s_args + o_args \
+ extra_postargs
@@ -642,8 +639,6 @@
linker = self.linker_exe[:]
else:
linker = self.linker_so[:]
- if os.name == 'nt':
- linker = _nt_quote_args(linker)
command = linker + ld_args
try:
self.spawn(command)
Modified: trunk/numpy/distutils/fcompiler/gnu.py
===================================================================
--- trunk/numpy/distutils/fcompiler/gnu.py 2007-07-25 09:02:55 UTC (rev 3898)
+++ trunk/numpy/distutils/fcompiler/gnu.py 2007-07-25 11:21:35 UTC (rev 3899)
@@ -46,6 +46,7 @@
# GNU Fortran (GCC) 3.3.3 (Debian 20040401)
# GNU Fortran 0.5.25 20010319 (prerelease)
# Redhat: GNU Fortran (GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
+ # GNU Fortran (GCC) 3.4.2 (mingw-special)
possible_executables = ['g77', 'f77']
executables = {
@@ -325,6 +326,11 @@
compiler = GnuFCompiler()
compiler.customize()
print compiler.get_version()
- compiler = Gnu95FCompiler()
- compiler.customize()
- print compiler.get_version()
+ raw_input('Press ENTER to continue...')
+ try:
+ compiler = Gnu95FCompiler()
+ compiler.customize()
+ print compiler.get_version()
+ except Exception, msg:
+ print msg
+ raw_input('Press ENTER to continue...')
More information about the Numpy-svn
mailing list