From 7339218edd6c91688c2eac8c41be1d72950f7def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20F=C3=A4lt?= Date: Thu, 5 Dec 2019 15:05:20 +0200 Subject: 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 (cherry picked from commit 607b33aab2477f49eeb08b780ff9962d4e4f2a04) Reviewed-by: Qt Cherry-pick Bot --- coin/provisioning/common/windows/python3.ps1 | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'coin/provisioning/common/windows') 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" } -- cgit v1.2.3