mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
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. Pick-to: 5.15 Change-Id: I8ea121514f6a4092f700688363c282cbea37a75b Reviewed-by: Toni Saario <toni.saario@qt.io>
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user