summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Halmet <heikki.halmet@qt.io>2018-04-03 10:28:29 +0300
committerLiang Qi <liang.qi@qt.io>2018-04-15 05:55:35 +0000
commit2e6af2bba76358323d386a8287b9f34b08210347 (patch)
tree8284368e64780af63143fb1c7790334737f4eec4
parentc79d285ffa13590192e7768f7923645c73026a27 (diff)
downloadqt5-2e6af2bba76358323d386a8287b9f34b08210347.tar.gz
Provisioning: Upgrade pip to latest version
Latest pip version is not installed during python installation. Pip need to be reinstalled after python installation because older version of pip seems to cause installation problems randomly at least with python 2.7 Task-number: QTQAINFRA-1902 Change-Id: If3d74130ecee6e410c64cad309feff9edc0e5db0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
-rwxr-xr-xcoin/provisioning/common/macos/pip.sh14
-rwxr-xr-xcoin/provisioning/common/macos/python2.sh7
-rwxr-xr-xcoin/provisioning/common/macos/python3.sh7
-rwxr-xr-xcoin/provisioning/qtci-macos-10.12-x86_64/25-pip.sh6
4 files changed, 24 insertions, 10 deletions
diff --git a/coin/provisioning/common/macos/pip.sh b/coin/provisioning/common/macos/pip.sh
index c9af5fbc..2d07db85 100755
--- a/coin/provisioning/common/macos/pip.sh
+++ b/coin/provisioning/common/macos/pip.sh
@@ -1,5 +1,11 @@
#!/usr/bin/env bash
-# Will install pip utility for python
-curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
-sudo python get-pip.py
-rm get-pip.py
+
+function InstallPip {
+
+ python=$1
+
+ # Will install pip utility for python
+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
+ sudo "$python" get-pip.py
+ rm get-pip.py
+}
diff --git a/coin/provisioning/common/macos/python2.sh b/coin/provisioning/common/macos/python2.sh
index fbebee42..687b9be5 100755
--- a/coin/provisioning/common/macos/python2.sh
+++ b/coin/provisioning/common/macos/python2.sh
@@ -35,8 +35,12 @@
# This script installs python2
+# shellcheck source=./InstallPKGFromURL.sh
source "${BASH_SOURCE%/*}/InstallPKGFromURL.sh"
+# shellcheck source=./../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+# shellcheck source=./pip.sh
+source "${BASH_SOURCE%/*}/pip.sh"
PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/python-2.7.14-macosx10.6.pkg"
AltUrl="https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg"
@@ -45,8 +49,11 @@ DestDir="/"
InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir"
+InstallPip python2.7
+
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip install virtualenv
SetEnvVar "PATH" "/Library/Frameworks/Python.framework/Versions/2.7/bin/:\$PATH"
echo "python2 = 2.7.14" >> ~/versions.txt
+
diff --git a/coin/provisioning/common/macos/python3.sh b/coin/provisioning/common/macos/python3.sh
index f38ab5e6..f2876a20 100755
--- a/coin/provisioning/common/macos/python3.sh
+++ b/coin/provisioning/common/macos/python3.sh
@@ -36,8 +36,12 @@
# This script installs python3
+# shellcheck source=./InstallPKGFromURL.sh
source "${BASH_SOURCE%/*}/InstallPKGFromURL.sh"
+# shellcheck source=./../unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+# shellcheck source=./pip.sh
+source "${BASH_SOURCE%/*}/pip.sh"
PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/python-3.6.1-macosx10.6.pkg"
AltUrl="https://www.python.org/ftp/python/3.6.1/python-3.6.1-macosx10.6.pkg"
@@ -46,9 +50,12 @@ DestDir="/"
InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir"
+InstallPip python3.6
+
/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3 install virtualenv
SetEnvVar "PYTHON3_PATH" "/Library/Frameworks/Python.framework/Versions/3.6/bin"
SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.6/bin"
echo "python3 = 3.6.1" >> ~/versions.txt
+
diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/25-pip.sh b/coin/provisioning/qtci-macos-10.12-x86_64/25-pip.sh
deleted file mode 100755
index 69c6b318..00000000
--- a/coin/provisioning/qtci-macos-10.12-x86_64/25-pip.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-BASEDIR=$(dirname "$0")
-$BASEDIR/../common/macos/pip.sh