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 | |
| 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')
| -rw-r--r-- | numpy/distutils/command/build.py | 11 | ||||
| -rw-r--r-- | numpy/distutils/command/build_src.py | 11 |
2 files changed, 13 insertions, 9 deletions
diff --git a/numpy/distutils/command/build.py b/numpy/distutils/command/build.py index b3e18b204..e44f5c0c5 100644 --- a/numpy/distutils/command/build.py +++ b/numpy/distutils/command/build.py @@ -16,8 +16,8 @@ class build(old_build): user_options = old_build.user_options + [ ('fcompiler=', None, "specify the Fortran compiler type"), - ('parallel=', 'j', - "number of parallel jobs"), + ('debug-configure', None, + "show compiler output while determining platform-specific flags") ] help_options = old_build.help_options + [ @@ -28,14 +28,9 @@ class build(old_build): def initialize_options(self): old_build.initialize_options(self) self.fcompiler = None - self.parallel = None + self.debug_configure = False def finalize_options(self): - if self.parallel: - try: - self.parallel = int(self.parallel) - except ValueError: - raise ValueError("--parallel/-j argument must be an integer") build_scripts = self.build_scripts old_build.finalize_options(self) plat_specifier = ".{}-{}.{}".format(get_platform(), *sys.version_info[:2]) 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): |
