aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/windows
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 /coin/provisioning/common/windows
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>
Diffstat (limited to 'coin/provisioning/common/windows')
-rw-r--r--coin/provisioning/common/windows/python3.ps126
1 files changed, 17 insertions, 9 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"
}