diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-12-16 21:55:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 21:55:52 +0200 |
commit | d7a75e8e8fefc433cf6e5305807d5f3180954273 (patch) | |
tree | 5f5ff968bc69ac268087f1aff2be85b43a0278a0 /benchmarks | |
parent | c4693fe6f291ff142f6729ba1d3d6baa1b968b38 (diff) | |
parent | 11728e8a3cf967455aacc36e2d2237745b07c1e7 (diff) | |
download | numpy-d7a75e8e8fefc433cf6e5305807d5f3180954273.tar.gz |
Merge pull request #17736 from seiko2plus/issue_17716
BUG, Benchmark: fix passing optimization build options to asv
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/asv_compare.conf.json.tpl | 4 | ||||
-rw-r--r-- | benchmarks/asv_pip_nopep517.py | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/benchmarks/asv_compare.conf.json.tpl b/benchmarks/asv_compare.conf.json.tpl index 1f339077c..03d13d985 100644 --- a/benchmarks/asv_compare.conf.json.tpl +++ b/benchmarks/asv_compare.conf.json.tpl @@ -78,7 +78,9 @@ "build_command" : [ "python setup.py build {numpy_build_options}", - "PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}" + // pip ignores '--global-option' when pep517 is enabled, we also enabling pip verbose to + // be reached from asv `--verbose` so we can verify the build options. + "PIP_NO_BUILD_ISOLATION=false python {build_dir}/benchmarks/asv_pip_nopep517.py -v {numpy_global_options} --no-deps --no-index -w {build_cache_dir} {build_dir}" ], // The commits after which the regression search in `asv publish` // should start looking for regressions. Dictionary whose keys are diff --git a/benchmarks/asv_pip_nopep517.py b/benchmarks/asv_pip_nopep517.py new file mode 100644 index 000000000..9ba165493 --- /dev/null +++ b/benchmarks/asv_pip_nopep517.py @@ -0,0 +1,15 @@ +""" +This file is used by asv_compare.conf.json.tpl. +""" +import subprocess, sys +# pip ignores '--global-option' when pep517 is enabled therefore we disable it. +cmd = [sys.executable, '-mpip', 'wheel', '--no-use-pep517'] +try: + output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, universal_newlines=True) +except Exception as e: + output = str(e.output) +if "no such option" in output: + print("old version of pip, escape '--no-use-pep517'") + cmd.pop() + +subprocess.run(cmd + sys.argv[1:]) |