| 1 |
""" |
| 2 |
This file is used by asv_compare.conf.json.tpl. |
| 3 |
|
| 4 |
Note |
| 5 |
---- |
| 6 |
|
| 7 |
This file is copied (possibly with major modifications) from the |
| 8 |
sources of the numpy project - https://github.com/numpy/numpy. |
| 9 |
It remains licensed as the rest of NUMPY (BSD 3-Clause as of November 2023). |
| 10 |
|
| 11 |
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## |
| 12 |
# |
| 13 |
# See COPYING file distributed along with the Numpy package for the |
| 14 |
# copyright and license terms. |
| 15 |
# |
| 16 |
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## |
| 17 |
""" |
| 18 |
|
| 19 |
import subprocess |
| 20 |
import sys |
| 21 |
|
| 22 |
|
| 23 |
cmd = [sys.executable, "-mpip", "wheel", "--no-use-pep517"] |
| 24 |
try: |
| 25 |
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, text=True) |
| 26 |
except Exception as e: |
| 27 |
output = str(e.output) |
| 28 |
if "no such option" in output: |
| 29 |
print("old version of pip, escape '--no-use-pep517'") |
| 30 |
cmd.pop() |
| 31 |
|
| 32 |
subprocess.run(cmd + sys.argv[1:]) |