summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/build_clib.py
diff options
context:
space:
mode:
authorSayed Adel <seiko@imavr.com>2021-05-04 08:00:48 +0200
committerSayed Adel <seiko@imavr.com>2021-05-04 08:49:01 +0200
commit034aedc545c03417c0dae1b20c84098459c4b3a4 (patch)
tree35b7865b103064c6a39a42e932e8e1c4e02e37fc /numpy/distutils/command/build_clib.py
parentccfd68d88fa356d7f097e216fb2c16b14da4052d (diff)
downloadnumpy-034aedc545c03417c0dae1b20c84098459c4b3a4.tar.gz
BLD, BUG: Fix compiler optimization log AttributeError
The error appears when option `build` is represented before `bdist_wheel`.
Diffstat (limited to 'numpy/distutils/command/build_clib.py')
-rw-r--r--numpy/distutils/command/build_clib.py8
1 files changed, 4 insertions, 4 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