aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2020-04-29 15:19:59 +0300
committerSimo Fält <simo.falt@qt.io>2020-04-29 18:15:18 +0300
commit4ce0bb903c21ff40140295d9ee87b3951c0fd108 (patch)
tree61ca7622182850f75996623797527f6621404a64
parent811a8a0631c6aacb20b68696eb769109af16b519 (diff)
Do not upgrade pip in during build/test
The pip should be quite up to date already after provisioning CI templates. Upgrading it later may cause permission issues. Change-Id: Ia2b80d902eb74dbc24fe6fb00f3245657545e9dd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--coin_build_instructions.py6
-rw-r--r--coin_test_instructions.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/coin_build_instructions.py b/coin_build_instructions.py
index 325b02dec..6453cfad5 100644
--- a/coin_build_instructions.py
+++ b/coin_build_instructions.py
@@ -112,8 +112,10 @@ def call_setup(python_ver, phase):
run_instruction(["virtualenv", "-p", _pExe, _env], "Failed to create virtualenv")
# When the 'python_ver' variable is empty, we are using Python 2
# setuptools from v45+ removed the support for Python 2, so we pin an old release
- install_pip_dependencies(env_pip, ["pip",
- "numpy" if python_ver else "numpy==1.16.6",
+ # Pip is always upgraded when CI template is provisioned, upgrading it in later phase may cause perm issue
+ upgrade_pip = True if CI_HOST_OS == "Linux" else False
+ install_pip_dependencies(env_pip, ["pip"], upgrade_pip)
+ install_pip_dependencies(env_pip, ["numpy" if python_ver else "numpy==1.16.6",
"setuptools" if python_ver else "setuptools==44.0.0",
"sphinx", "six", "wheel"])
diff --git a/coin_test_instructions.py b/coin_test_instructions.py
index 65c564df5..cb29acab4 100644
--- a/coin_test_instructions.py
+++ b/coin_test_instructions.py
@@ -65,7 +65,9 @@ def call_testrunner(python_ver, buildnro):
_pExe, _env, env_pip, env_python = get_qtci_virtualEnv(python_ver, CI_HOST_OS, CI_HOST_ARCH, CI_TARGET_ARCH)
rmtree(_env, True)
run_instruction(["virtualenv", "-p", _pExe, _env], "Failed to create virtualenv")
- install_pip_dependencies(env_pip, ["pip", "numpy", "PyOpenGL", "setuptools", "six", "pyinstaller==3.6", "wheel"])
+ upgrade_pip = True if CI_HOST_OS == "Linux" else False
+ install_pip_dependencies(env_pip, ["pip"], upgrade_pip)
+ install_pip_dependencies(env_pip, ["numpy", "PyOpenGL", "setuptools", "six", "pyinstaller==3.6", "wheel"])
cmd = [env_python, "testrunner.py", "test",
"--blacklist", "build_history/blacklist.txt",
"--buildno=" + buildnro]