Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17736 from seiko2plus/issue_17716
BUG, Benchmark: fix passing optimization build options to asv
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters