summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/build_src.py
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2019-09-20 10:31:31 +0200
committerGitHub <noreply@github.com>2019-09-20 10:31:31 +0200
commit815061c3ce9672b850147a0bc3535ebb220913e0 (patch)
tree842a284f23c987fcf9d189e4ab405fd41c7d1f5e /numpy/distutils/command/build_src.py
parent3096f1ab91b97214c5b0b91d0bd21b56206fc372 (diff)
parent492fdab94de8fb77bac9f10f48b196db08852677 (diff)
downloadnumpy-815061c3ce9672b850147a0bc3535ebb220913e0.tar.gz
Merge pull request #14518 from mattip/hide-config-probe
BUILD: Hide platform configuration probe behind --debug-configure
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r--numpy/distutils/command/build_src.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py
index e183b2090..664b52e37 100644
--- a/numpy/distutils/command/build_src.py
+++ b/numpy/distutils/command/build_src.py
@@ -53,9 +53,12 @@ class build_src(build_ext.build_ext):
('inplace', 'i',
"ignore build-lib and put compiled extensions into the source " +
"directory alongside your pure Python modules"),
+ ('verbose', 'v',
+ "change logging level from WARN to INFO which will show all " +
+ "compiler output")
]
- boolean_options = ['force', 'inplace']
+ boolean_options = ['force', 'inplace', 'verbose']
help_options = []
@@ -76,6 +79,7 @@ class build_src(build_ext.build_ext):
self.swig_opts = None
self.swig_cpp = None
self.swig = None
+ self.verbose = False
def finalize_options(self):
self.set_undefined_options('build',
@@ -365,6 +369,13 @@ class build_src(build_ext.build_ext):
build_dir = os.path.join(*([self.build_src]
+name.split('.')[:-1]))
self.mkpath(build_dir)
+
+ if self.verbose:
+ new_level = log.INFO
+ else:
+ new_level = log.WARN
+ old_level = log.set_threshold(new_level)
+
for func in func_sources:
source = func(extension, build_dir)
if not source:
@@ -375,7 +386,7 @@ class build_src(build_ext.build_ext):
else:
log.info(" adding '%s' to sources." % (source,))
new_sources.append(source)
-
+ log.set_threshold(old_level)
return new_sources
def filter_py_files(self, sources):