Skip to content

Commit a521984

Browse files
committed
Try to fix downloads in appveyor.
1 parent a7316bf commit a521984

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

appveyor_install.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ function InstallPython ($python_version, $architecture, $python_home) {
4848
$installer_exe = ($py_major + $py_minor) -as [int] -ge 35
4949
if ($installer_exe) {
5050
$arch_suffix = @{"32"="";"64"="-amd64"}[$architecture]
51-
$filename = "python-" + $python_version + $arch_suffix + ".exe"
51+
$dl_filename = "python-" + $python_version + $arch_suffix + ".exe"
52+
$filename = "python-" + $py_major + "." + $py_minor + $arch_suffix + ".exe"
5253
} else {
5354
$arch_suffix = @{"32"="";"64"=".amd64"}[$architecture]
54-
$filename = "python-" + $python_version + $arch_suffix + ".msi"
55+
$dl_filename = "python-" + $python_version + $arch_suffix + ".msi"
56+
$filename = "python-" + $py_major + "." + $py_minor + $arch_suffix + ".msi"
5557
}
56-
$url = $PYTHON_BASE_URL + $python_version + ".0/" + $filename
58+
$url = $PYTHON_BASE_URL + $python_version + "/" + $dl_filename
5759
$filepath = Download $url $filename $DOWNLOADS
5860
Write-Host "Installing" $filename "to" $python_home
5961
if ($installer_exe) {
@@ -99,7 +101,7 @@ function InstallPipPackage ($python_home, $package) {
99101
}
100102

101103
function main () {
102-
InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
104+
InstallPython $env:PYTHON_VERSION + ".0" $env:PYTHON_ARCH $env:PYTHON
103105
InstallPip $env:PYTHON
104106
InstallPipPackage $env:PYTHON setuptools
105107
InstallPipPackage $env:PYTHON wheel

0 commit comments

Comments
 (0)