diff options
author | mattip <matti.picus@gmail.com> | 2019-09-15 10:20:38 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-09-20 09:34:47 +0300 |
commit | 9852340606cf5f0e23cca8107e2bce61f022bc4e (patch) | |
tree | 54b2a6311c1659ebc60b69147186f0fbf657d10c /numpy/distutils/command/build_src.py | |
parent | 3096f1ab91b97214c5b0b91d0bd21b56206fc372 (diff) | |
download | numpy-9852340606cf5f0e23cca8107e2bce61f022bc4e.tar.gz |
BUILD: add --debug-configure option to reduce output, use logger more
Diffstat (limited to 'numpy/distutils/command/build_src.py')
-rw-r--r-- | numpy/distutils/command/build_src.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/numpy/distutils/command/build_src.py b/numpy/distutils/command/build_src.py index e183b2090..22e2dbf52 100644 --- a/numpy/distutils/command/build_src.py +++ b/numpy/distutils/command/build_src.py @@ -365,6 +365,15 @@ class build_src(build_ext.build_ext): build_dir = os.path.join(*([self.build_src] +name.split('.')[:-1])) self.mkpath(build_dir) + + # it is unclear how to pass the cmdline options from build to here so + # "parse" the command line again + if '--debug-configure' in sys.argv: + 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 +384,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): |