summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/distutils/command/build_clib.py8
-rw-r--r--numpy/distutils/command/build_ext.py9
2 files changed, 9 insertions, 8 deletions
diff --git a/numpy/distutils/command/build_clib.py b/numpy/distutils/command/build_clib.py
index a4f49b00e..e1f15d465 100644
--- a/numpy/distutils/command/build_clib.py
+++ b/numpy/distutils/command/build_clib.py
@@ -132,12 +132,12 @@ class build_clib(old_build_clib):
log.info("Detected changes on compiler optimizations, force rebuilding")
self.force = True
- import atexit
- def report():
+ def report(copt):
log.info("\n########### CLIB COMPILER OPTIMIZATION ###########")
- log.info(self.compiler_opt.report(full=True))
+ log.info(copt.report(full=True))
- atexit.register(report)
+ import atexit
+ atexit.register(report, self.compiler_opt)
if self.have_f_sources():
from numpy.distutils.fcompiler import new_fcompiler
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py
index 91cb0d897..ca29ad4c0 100644
--- a/numpy/distutils/command/build_ext.py
+++ b/numpy/distutils/command/build_ext.py
@@ -160,11 +160,12 @@ class build_ext (old_build_ext):
log.info("Detected changes on compiler optimizations, force rebuilding")
self.force = True
- import atexit
- def report():
+ def report(copt):
log.info("\n########### EXT COMPILER OPTIMIZATION ###########")
- log.info(self.compiler_opt.report(full=True))
- atexit.register(report)
+ log.info(copt.report(full=True))
+
+ import atexit
+ atexit.register(report, self.compiler_opt)
# Setup directory for storing generated extra DLL files on Windows
self.extra_dll_dir = os.path.join(self.build_temp, '.libs')