aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2019-12-05 15:05:20 +0200
committerSimo Fält <simo.falt@qt.io>2020-07-17 10:35:58 +0300
commit7339218edd6c91688c2eac8c41be1d72950f7def (patch)
tree515e11ca57d88e6938aae5a4ed8a8145f47cba10
parent73765a68851ca2cb23b99471d2082efe722d8d5d (diff)
Provisioning: Install Python 3.8 for testing Qt for Python
This installs Python 3.8.1 to be used with Qt for Python. It keeps the old 3.6 as a default python3. Change-Id: I8ea121514f6a4092f700688363c282cbea37a75b Reviewed-by: Toni Saario <toni.saario@qt.io> (cherry picked from commit 607b33aab2477f49eeb08b780ff9962d4e4f2a04) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--coin/provisioning/common/windows/python3.ps126
-rw-r--r--coin/provisioning/qtci-windows-10-x86_64/08-python3-32.ps11
-rw-r--r--coin/provisioning/qtci-windows-10-x86_64/08-python3.ps113
3 files changed, 29 insertions, 11 deletions
diff --git a/coin/provisioning/common/windows/python3.ps1 b/coin/provisioning/common/windows/python3.ps1
index 8fbd615c..9eba058c 100644
--- a/coin/provisioning/common/windows/python3.ps1
+++ b/coin/provisioning/common/windows/python3.ps1
@@ -35,12 +35,14 @@
# This script installs Python $version.
# Python3 is required for building some qt modules.
param(
- [Int32]$archVer=32,
- [string]$install_path = "C:\Python36"
+ [Int32]$archVer,
+ [string]$sha1,
+ [string]$install_path,
+ [string]$version,
+ [bool]$setDefault=$false
)
. "$PSScriptRoot\helpers.ps1"
-$version = "3.6.1"
$package = "C:\Windows\temp\python-$version.exe"
# check bit version
@@ -48,11 +50,9 @@ if ( $archVer -eq 64 ) {
Write-Host "Installing 64 bit Python"
$externalUrl = "https://www.python.org/ftp/python/$version/python-$version-amd64.exe"
$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/python-$version-amd64.exe"
- $sha1 = "bf54252c4065b20f4a111cc39cf5215fb1edccff"
} else {
$externalUrl = "https://www.python.org/ftp/python/$version/python-$version.exe"
$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/python-$version.exe"
- $sha1 = "76c50b747237a0974126dd8b32ea036dd77b2ad1"
}
Write-Host "Fetching from URL..."
@@ -65,11 +65,19 @@ Remove-Item -Path $package
# For cross-compilation we export some helper env variable
if (($archVer -eq 32) -And (Is64BitWinHost)) {
- Set-EnvironmentVariable "PYTHON3_32_PATH" "$install_path"
- Set-EnvironmentVariable "PIP3_32_PATH" "$install_path\Scripts"
+ if ($setDefault) {
+ Set-EnvironmentVariable "PYTHON3_32_PATH" "$install_path"
+ Set-EnvironmentVariable "PIP3_32_PATH" "$install_path\Scripts"
+ }
+ Set-EnvironmentVariable "PYTHON$version-32_PATH" "$install_path"
+ Set-EnvironmentVariable "PIP$version-32_PATH" "$install_path\Scripts"
} else {
- Set-EnvironmentVariable "PYTHON3_PATH" "$install_path"
- Set-EnvironmentVariable "PIP3_PATH" "$install_path\Scripts"
+ if ($setDefault) {
+ Set-EnvironmentVariable "PYTHON3_PATH" "$install_path"
+ Set-EnvironmentVariable "PIP3_PATH" "$install_path\Scripts"
+ }
+ Set-EnvironmentVariable "PYTHON$version-64_PATH" "$install_path"
+ Set-EnvironmentVariable "PIP$version-64_PATH" "$install_path\Scripts"
}
diff --git a/coin/provisioning/qtci-windows-10-x86_64/08-python3-32.ps1 b/coin/provisioning/qtci-windows-10-x86_64/08-python3-32.ps1
deleted file mode 100644
index 5ffeab3b..00000000
--- a/coin/provisioning/qtci-windows-10-x86_64/08-python3-32.ps1
+++ /dev/null
@@ -1 +0,0 @@
-. "$PSScriptRoot\..\common\windows\python3.ps1" 32 "C:\Python36_32"
diff --git a/coin/provisioning/qtci-windows-10-x86_64/08-python3.ps1 b/coin/provisioning/qtci-windows-10-x86_64/08-python3.ps1
index 3201032d..0ab0ed39 100644
--- a/coin/provisioning/qtci-windows-10-x86_64/08-python3.ps1
+++ b/coin/provisioning/qtci-windows-10-x86_64/08-python3.ps1
@@ -1 +1,12 @@
-. "$PSScriptRoot\..\common\windows\python3.ps1" 64
+# Parameters:
+# - Arch 32/64
+# - installer sha1
+# - install target dir
+# - version
+# - Optional true/false if set as default with PYTHON3/PIP3_PATH variables, default false
+
+. "$PSScriptRoot\..\common\windows\python3.ps1" 64 "a8ac14ee5486547caf84abdf151be22d9d069c0a" "C:\Python38_64" "3.8.1"
+. "$PSScriptRoot\..\common\windows\python3.ps1" 32 "14ff2c2e5538b03a012cb4c9d519d970444ebd42" "C:\Python38_32" "3.8.1"
+# default ones
+. "$PSScriptRoot\..\common\windows\python3.ps1" 64 "bf54252c4065b20f4a111cc39cf5215fb1edccff" "C:\Python36" "3.6.1" $true
+. "$PSScriptRoot\..\common\windows\python3.ps1" 32 "76c50b747237a0974126dd8b32ea036dd77b2ad1" "C:\Python36_32" "3.6.1" $true