Unverified Commit d0cf77e6 authored by Matti Picus's avatar Matti Picus Committed by GitHub
Browse files

Merge pull request #264 from mattip/windows-3.8

Add python 3.8.0rc1 to windows possibilities
parents f0bff09b e268b8f6
...@@ -80,3 +80,5 @@ test_script: ...@@ -80,3 +80,5 @@ test_script:
- ps: .\install_python.ps1 - ps: .\install_python.ps1
- set PYTHON=C:\Python37-x64 - set PYTHON=C:\Python37-x64
- ps: .\install_python.ps1 - ps: .\install_python.ps1
- set PYTHON=C:\Python38rc1-x64
- ps: .\install_python.ps1
downloads/ downloads/
*.orig *.orig
*.swp
...@@ -7,8 +7,9 @@ $py_exe = "${env:PYTHON}\Python.exe" ...@@ -7,8 +7,9 @@ $py_exe = "${env:PYTHON}\Python.exe"
if ( [System.IO.File]::Exists($py_exe) ) { if ( [System.IO.File]::Exists($py_exe) ) {
exit 0 exit 0
} }
$req_nodot = $env:PYTHON -replace '\D+Python(\d+)(?:-x64)?','$1' $req_nodot = $env:PYTHON -replace '\D+Python(\d+(?:rc\d+))(?:-x64)?','$1'
$req_ver = $req_nodot -replace '(\d)(\d+)','$1.$2.0' $req_ver = $req_nodot -replace '(\d)(\d+)','$1.$2.0'
$req_dir = $req_nodot -replace '(\d)(\d+)(.*)','$1.$2.0'
if ($env:PYTHON -eq "C:\Python${req_nodot}-x64") { if ($env:PYTHON -eq "C:\Python${req_nodot}-x64") {
$exe_suffix="-amd64" $exe_suffix="-amd64"
...@@ -21,7 +22,8 @@ if ($env:PYTHON -eq "C:\Python${req_nodot}-x64") { ...@@ -21,7 +22,8 @@ if ($env:PYTHON -eq "C:\Python${req_nodot}-x64") {
$py_url = "https://www.python.org/ftp/python" $py_url = "https://www.python.org/ftp/python"
Write-Host "Installing Python ${req_ver}$exe_suffix..." -ForegroundColor Cyan Write-Host "Installing Python ${req_ver}$exe_suffix..." -ForegroundColor Cyan
$exePath = "$env:TEMP\python-${req_ver}${exe_suffix}.exe" $exePath = "$env:TEMP\python-${req_ver}${exe_suffix}.exe"
$downloadFile = "$py_url/${req_ver}/python-${req_ver}${exe_suffix}.exe" $downloadFile = "$py_url/${req_dir}/python-${req_ver}${exe_suffix}.exe"
Write-Host "Downloading $downloadFile..." Write-Host "Downloading $downloadFile..."
(New-Object Net.WebClient).DownloadFile($downloadFile, $exePath) (New-Object Net.WebClient).DownloadFile($downloadFile, $exePath)
Write-Host "Installing..." Write-Host "Installing..."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment