From 464d7643f60473af224c10569b08617416997a67 Mon Sep 17 00:00:00 2001 From: Kevin Modzelewski Date: Wed, 20 Jul 2022 22:10:16 -0400 Subject: [PATCH] I had a newer version of this file somewhere else --- run_pyperformance.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/run_pyperformance.py b/run_pyperformance.py index 9732f5d..bd7d8de 100644 --- a/run_pyperformance.py +++ b/run_pyperformance.py @@ -5,9 +5,15 @@ from pyperformance._venv import VirtualEnvironment if __name__ == "__main__": - packages = os.environ.get("EXTRA_PACKAGES", "") - if packages: - packages = [pkg for pkg in packages.split(':')] + raw_wheels = os.environ["EXTRA_WHEELS"] + assert raw_wheels + wheels = [] + for fn in raw_wheels.split(';'): + if os.path.exists(fn): + wheels.append(os.path.abspath(fn)) + else: + wheels.append(fn) + assert wheels ensure_reqs = VirtualEnvironment.ensure_reqs def new_ensure_reqs(self, *args, **kw): @@ -15,12 +21,10 @@ def new_ensure_reqs(self, *args, **kw): r = ensure_reqs(self, *args, **kw) - if packages: - print("Installing", packages) - subprocess.check_call([python, "-m", "pip", "install"] + packages) - - if "pyston_lite_autoload" in packages: - subprocess.check_call([python, "-c", "import sys; assert 'pyston_lite' in sys.modules"]) + print("Installing", wheels) + subprocess.check_call([python, "-m", "pip", "install"] + wheels) + if "pyston_lite_autoload" in raw_wheels: + subprocess.check_call([python, "-c", "import sys; assert 'pyston_lite' in sys.modules"]) return r VirtualEnvironment.ensure_reqs = new_ensure_reqs