summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2017-07-17 11:10:53 +0300
committerSimo Fält <simo.falt@qt.io>2017-07-19 05:54:01 +0000
commitc9d5341307e02cc71d4d99342e6915621f7d18f3 (patch)
treedfe365ccda501440835f2f0d9a2f56fefd5d66f2
parenteca392d3f3831f07c96a24f08feb0f292b9dd62b (diff)
Provisioning: Fix virtualenv in macOS 10.11
There are multiple Python installations in our macOS 10.11 Tier1 template. Most of them are pretty old and not even working properly. One of the affected Python tool is virtualenv, which atm is creating Python 2.6 env by default even if Python 2.7 is the default Python. Change-Id: I8bc0900976a9dc79637539802345175c85b7b433 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rwxr-xr-xcoin/provisioning/qtci-osx-10.11-x86_64/004-fix-virtualenv.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/coin/provisioning/qtci-osx-10.11-x86_64/004-fix-virtualenv.sh b/coin/provisioning/qtci-osx-10.11-x86_64/004-fix-virtualenv.sh
new file mode 100755
index 00000000..f3646572
--- /dev/null
+++ b/coin/provisioning/qtci-osx-10.11-x86_64/004-fix-virtualenv.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+# macOS 10.11 template doesn't have working virtualenv installation.
+# To fix that, we first have to install pip to install virtualenv
+# Install pip
+curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
+sudo python get-pip.py
+rm get-pip.py
+
+# remove link pointing to broken virtualenv
+sudo rm /opt/local/bin/virtualenv
+sudo pip install virtualenv
+
+# fix the link. This is optional, while the new installation is
+# already in PATH, but there will be virtualenv-2.6 in /opt/local/bin
+# which might be confusing
+sudo ln -s /usr/local/bin/virtualenv /opt/local/bin/virtualenv