From 7a4e43da9f2f42591eaff90d2e8b15bf809e4308 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 14 Apr 2021 20:13:01 +0200 Subject: Fix Python install script on appveyor: The URL path uses three digit Python versions, not just major.minor. --- appveyor/install.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'appveyor') diff --git a/appveyor/install.ps1 b/appveyor/install.ps1 index ab027fcfe..d91b3f772 100644 --- a/appveyor/install.ps1 +++ b/appveyor/install.ps1 @@ -48,12 +48,14 @@ function InstallPython ($python_version, $architecture, $python_home) { $installer_exe = ($py_major + $py_minor) -as [int] -ge 35 if ($installer_exe) { $arch_suffix = @{"32"="";"64"="-amd64"}[$architecture] - $filename = "python-" + $python_version + $arch_suffix + ".exe" + $dl_filename = "python-" + $python_version + $arch_suffix + ".exe" + $filename = "python-" + $py_major + "." + $py_minor + $arch_suffix + ".exe" } else { $arch_suffix = @{"32"="";"64"=".amd64"}[$architecture] - $filename = "python-" + $python_version + $arch_suffix + ".msi" + $dl_filename = "python-" + $python_version + $arch_suffix + ".msi" + $filename = "python-" + $py_major + "." + $py_minor + $arch_suffix + ".msi" } - $url = $PYTHON_BASE_URL + $python_version + "/" + $filename + $url = $PYTHON_BASE_URL + $python_version + "/" + $dl_filename $filepath = Download $url $filename $DOWNLOADS Write-Host "Installing" $filename "to" $python_home if ($installer_exe) { @@ -99,7 +101,8 @@ function InstallPipPackage ($python_home, $package) { } function main () { - InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON + $full_version = $env:PYTHON_VERSION + ".0" + InstallPython $full_version $env:PYTHON_ARCH $env:PYTHON InstallPip $env:PYTHON InstallPipPackage $env:PYTHON setuptools InstallPipPackage $env:PYTHON wheel -- cgit v1.2.1