mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Improves the ability to build in CI (GH-5728)
This commit is contained in:
parent
d6ff8a7037
commit
01423cb53b
5 changed files with 21 additions and 12 deletions
|
@ -31,10 +31,10 @@
|
|||
@if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found in externals directory) & goto :found
|
||||
|
||||
@rem If HOST_PYTHON is recent enough, use that
|
||||
@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -c "import sys; assert sys.version_info[:2] >= (3, 6)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && (set _Py_Python_Source=found as HOST_PYTHON) && goto :found
|
||||
@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert sys.version_info[:2] >= (3, 6)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && (set _Py_Python_Source=found as HOST_PYTHON) && goto :found
|
||||
|
||||
@rem If py.exe finds a recent enough version, use that one
|
||||
@py -3.6 -V >nul 2>&1 && (set PYTHON=py -3.6) && (set _Py_Python_Source=found with py.exe) && goto :found
|
||||
@py -3.6 -EV >nul 2>&1 && (set PYTHON=py -3.6) && (set _Py_Python_Source=found with py.exe) && goto :found
|
||||
|
||||
@if NOT exist "%_Py_EXTERNALS_DIR%" mkdir "%_Py_EXTERNALS_DIR%"
|
||||
@set _Py_NUGET=%NUGET%
|
||||
|
@ -50,7 +50,7 @@
|
|||
@rem If it fails, retry with any available copy of Python
|
||||
@powershell.exe -Command Invoke-WebRequest %_Py_NUGET_URL% -OutFile '%_Py_NUGET%'
|
||||
@if errorlevel 1 (
|
||||
@%_Py_HOST_PYTHON% "%~dp0\urlretrieve.py" "%_Py_NUGET_URL%" "%_Py_NUGET%"
|
||||
@%_Py_HOST_PYTHON% -E "%~dp0\urlretrieve.py" "%_Py_NUGET_URL%" "%_Py_NUGET%"
|
||||
)
|
||||
)
|
||||
@echo Installing Python via nuget...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue