From 38c2382ba637b820d4269ad22a9558f86f9a47c8 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 9 Nov 2018 11:44:43 +0100 Subject: [PATCH] test_wheel: fix upgrading pip on Windows pip can only be upgraded by running `python -m pip` on Windows. [skip ci] --- makepanda/test_wheel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/makepanda/test_wheel.py b/makepanda/test_wheel.py index f4491964a9..09b0727fe7 100755 --- a/makepanda/test_wheel.py +++ b/makepanda/test_wheel.py @@ -24,15 +24,15 @@ def test_wheel(wheel, verbose=False): subprocess.call([sys.executable, "-m", "virtualenv", "--clear", envdir]) # Make sure pip is up-to-date first. - if sys.platform == "win32": - pip = os.path.join(envdir, "Scripts", "pip.exe") - else: - pip = os.path.join(envdir, "bin", "pip") - if subprocess.call([pip, "install", "-U", "pip"]) != 0: + if subprocess.call([sys.executable, "-m", "pip", "install", "-U", "pip"]) != 0: shutil.rmtree(envdir) sys.exit(1) # Install pytest into the environment, as well as our wheel. + if sys.platform == "win32": + pip = os.path.join(envdir, "Scripts", "pip.exe") + else: + pip = os.path.join(envdir, "bin", "pip") if subprocess.call([pip, "install", "pytest", wheel]) != 0: shutil.rmtree(envdir) sys.exit(1)