summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command/build_clib.py7
-rw-r--r--command/build_src.py6
-rw-r--r--fcompiler/gnu.py2
-rw-r--r--fcompiler/intel.py1
-rw-r--r--misc_util.py3
-rw-r--r--setup.py2
-rw-r--r--system_info.py4
-rw-r--r--tests/f2py_ext/setup.py2
-rw-r--r--tests/f2py_f90_ext/setup.py2
-rw-r--r--tests/gen_ext/setup.py2
-rw-r--r--tests/pyrex_ext/setup.py2
-rw-r--r--tests/setup.py2
-rw-r--r--tests/swig_ext/setup.py2
13 files changed, 27 insertions, 10 deletions
diff --git a/command/build_clib.py b/command/build_clib.py
index e254b54f4..2aff51e08 100644
--- a/command/build_clib.py
+++ b/command/build_clib.py
@@ -14,6 +14,13 @@ try:
except NameError:
from sets import Set as set
+# Fix Python distutils bug sf #1718574:
+_l = old_build_clib.user_options
+for _i in range(len(_l)):
+ if _l[_i][0] in ['build-clib', 'build-temp']:
+ _l[_i] = (_l[_i][0]+'=',)+_l[_i][1:]
+#
+
class build_clib(old_build_clib):
description = "build C/C++/F libraries used by Python extensions"
diff --git a/command/build_src.py b/command/build_src.py
index d697bdf16..3f534c825 100644
--- a/command/build_src.py
+++ b/command/build_src.py
@@ -356,10 +356,14 @@ class build_src(build_ext.build_ext):
if pyrex_result.num_errors != 0:
raise RuntimeError("%d errors in Pyrex compile" %
pyrex_result.num_errors)
- else:
+ elif os.path.isfile(target_file):
log.warn("Pyrex needed to compile %s but not available."\
" Using old target %s"\
% (source, target_file))
+ else:
+ raise SystemError,"Non-existing target %r. "\
+ "Perhaps you need to install Pyrex."\
+ % (target_file)
new_sources.append(target_file)
else:
new_sources.append(source)
diff --git a/fcompiler/gnu.py b/fcompiler/gnu.py
index c1353379c..76980ae7d 100644
--- a/fcompiler/gnu.py
+++ b/fcompiler/gnu.py
@@ -218,6 +218,8 @@ class GnuFCompiler(FCompiler):
march_opt = '-march=nocona'
elif cpu.is_Core2():
march_opt = '-march=nocona'
+ elif cpu.is_Xeon() and cpu.is_64bit():
+ march_opt = '-march=nocona'
elif cpu.is_Prescott():
march_opt = '-march=prescott'
elif cpu.is_PentiumIV():
diff --git a/fcompiler/intel.py b/fcompiler/intel.py
index 2c34d69ed..e8178eca9 100644
--- a/fcompiler/intel.py
+++ b/fcompiler/intel.py
@@ -79,7 +79,6 @@ class IntelFCompiler(FCompiler):
v = self.get_version()
if v and v >= '8.0':
opt.append('-nofor_main')
- opt.extend(self.get_flags_arch())
return opt
class IntelItaniumFCompiler(IntelFCompiler):
diff --git a/misc_util.py b/misc_util.py
index b843f675e..fd771429e 100644
--- a/misc_util.py
+++ b/misc_util.py
@@ -530,9 +530,10 @@ class Configuration(object):
caller_frame = get_frame(caller_level)
caller_name = eval('__name__',caller_frame.f_globals,caller_frame.f_locals)
self.local_path = get_path(caller_name, top_path)
+ # local_path -- directory of a file (usually setup.py) that
+ # defines a configuration() function.
if top_path is None:
top_path = self.local_path
- self.local_path = '.'
if package_path is None:
package_path = self.local_path
elif os.path.isdir(njoin(self.local_path,package_path)):
diff --git a/setup.py b/setup.py
index f26cf89af..b16225f41 100644
--- a/setup.py
+++ b/setup.py
@@ -12,4 +12,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == '__main__':
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)
diff --git a/system_info.py b/system_info.py
index 641e23bcf..3e53b3a18 100644
--- a/system_info.py
+++ b/system_info.py
@@ -1158,6 +1158,8 @@ from distutils.util import get_platform
class lapack_opt_info(system_info):
+ notfounderror = LapackNotFoundError
+
def calc_info(self):
if sys.platform=='darwin' and not os.environ.get('ATLAS',None):
@@ -1253,6 +1255,8 @@ class lapack_opt_info(system_info):
class blas_opt_info(system_info):
+ notfounderror = BlasNotFoundError
+
def calc_info(self):
if sys.platform=='darwin' and not os.environ.get('ATLAS',None):
diff --git a/tests/f2py_ext/setup.py b/tests/f2py_ext/setup.py
index ed369bc6c..e3dfddb74 100644
--- a/tests/f2py_ext/setup.py
+++ b/tests/f2py_ext/setup.py
@@ -8,4 +8,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == "__main__":
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)
diff --git a/tests/f2py_f90_ext/setup.py b/tests/f2py_f90_ext/setup.py
index 7183d2192..ee56cc3a6 100644
--- a/tests/f2py_f90_ext/setup.py
+++ b/tests/f2py_f90_ext/setup.py
@@ -13,4 +13,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == "__main__":
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)
diff --git a/tests/gen_ext/setup.py b/tests/gen_ext/setup.py
index d5f2fa971..bf029062c 100644
--- a/tests/gen_ext/setup.py
+++ b/tests/gen_ext/setup.py
@@ -44,4 +44,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == "__main__":
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)
diff --git a/tests/pyrex_ext/setup.py b/tests/pyrex_ext/setup.py
index 0a8186e3f..5b348b916 100644
--- a/tests/pyrex_ext/setup.py
+++ b/tests/pyrex_ext/setup.py
@@ -9,4 +9,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == "__main__":
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)
diff --git a/tests/setup.py b/tests/setup.py
index 6aac6651c..89d73800e 100644
--- a/tests/setup.py
+++ b/tests/setup.py
@@ -11,4 +11,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == "__main__":
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)
diff --git a/tests/swig_ext/setup.py b/tests/swig_ext/setup.py
index fffd858e0..7f0dbe627 100644
--- a/tests/swig_ext/setup.py
+++ b/tests/swig_ext/setup.py
@@ -15,4 +15,4 @@ def configuration(parent_package='',top_path=None):
if __name__ == "__main__":
from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
+ setup(configuration=configuration)