aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2018-07-16 15:13:05 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-31 14:36:41 +0000
commitf9f9e0944d0e0e7d04dd3b08479f867ab7fd638c (patch)
tree6e84a3b0463b1ca81d5b2729a601b1bac64f26ba /coin/provisioning/common
parentd16c0d26752968c4621778be62cd91489c9065bc (diff)
Download and cache needed python wheels during provisioning
Instead of downloading the packages during the compile/configure step setup a wheel cache folder during the provisioning phase Task-number: AUTOSUITE-195 Change-Id: I465f1be7cdd351e7680dcd8ae22d5e97ddf8cb2d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'coin/provisioning/common')
-rwxr-xr-xcoin/provisioning/common/macos/python3.sh6
-rw-r--r--coin/provisioning/common/shared/requirements.txt19
-rw-r--r--coin/provisioning/common/windows/python3.ps17
3 files changed, 30 insertions, 2 deletions
diff --git a/coin/provisioning/common/macos/python3.sh b/coin/provisioning/common/macos/python3.sh
index 545a6d02..35bccc93 100755
--- a/coin/provisioning/common/macos/python3.sh
+++ b/coin/provisioning/common/macos/python3.sh
@@ -52,10 +52,14 @@ InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir"
InstallPip python3.6
-/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3 install virtualenv
+/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3 install virtualenv wheel
SetEnvVar "PYTHON3_PATH" "/Library/Frameworks/Python.framework/Versions/3.6/bin"
SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.6/bin"
+# Install all needed packages in a special wheel cache directory
+/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3 wheel --wheel-dir $HOME/python3-wheels -r ${BASH_SOURCE%/*}/../shared/requirements.txt
+SetEnvVar "PYTHON3_WHEEL_CACHE" "$HOME/python3-wheels"
+
echo "python3 = 3.6.1" >> ~/versions.txt
diff --git a/coin/provisioning/common/shared/requirements.txt b/coin/provisioning/common/shared/requirements.txt
new file mode 100644
index 00000000..12380d85
--- /dev/null
+++ b/coin/provisioning/common/shared/requirements.txt
@@ -0,0 +1,19 @@
+# This file holds all python3 packages need for a certain qt module
+# When adding new packages here, first add a comment with the name of the module
+# Then all the packages. Duplicates are wanted as every module should install
+# all packages it needs and shouldn't depend on a package from another module
+#
+# qtivi
+antlr4-python3-runtime==4.7.1
+argh==0.26.2
+click==6.7
+coloredlogs==10.0
+humanfriendly==4.15.1
+Jinja2==2.10
+MarkupSafe==1.0
+path.py==11.0.1
+pathtools==0.1.2
+PyYAML==3.13
+six==1.11.0
+typing==3.6.4
+watchdog==0.8.3
diff --git a/coin/provisioning/common/windows/python3.ps1 b/coin/provisioning/common/windows/python3.ps1
index 473fe65c..e4ab667f 100644
--- a/coin/provisioning/common/windows/python3.ps1
+++ b/coin/provisioning/common/windows/python3.ps1
@@ -79,7 +79,12 @@ if (IsProxyEnabled) {
Write-Host "Using proxy ($proxy) with pip"
$pip_args = "--proxy=$proxy"
}
-Run-Executable "$install_path\Scripts\pip3.exe" "$pip_args install virtualenv"
+Run-Executable "$install_path\Scripts\pip3.exe" "$pip_args install virtualenv wheel"
+
+# Install all needed packages in a special wheel cache directory
+$python3_wheel_dir="$install_path\python3-wheels"
+Run-Executable "$install_path\Scripts\pip3.exe" "$pip_args wheel --wheel-dir $python3_wheel_dir -r $PSScriptRoot\..\shared\requirements.txt"
+Set-EnvironmentVariable "PYTHON3_WHEEL_CACHE" "$python3_wheel_dir"
Write-Output "Python3-$archVer = $version" >> ~/versions.txt