diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-07-19 07:11:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-19 07:11:08 (GMT) |
commit | e99d3a52a50b3f836fb9fb88f317aacddd494858 (patch) | |
tree | 3347183e2ddbd4948ac3070d96505ca6a38908f8 /Tools/msi | |
parent | 241c4a28d9fec7f2beffc9cbd21f156999959a9d (diff) | |
download | cpython-e99d3a52a50b3f836fb9fb88f317aacddd494858.zip cpython-e99d3a52a50b3f836fb9fb88f317aacddd494858.tar.gz cpython-e99d3a52a50b3f836fb9fb88f317aacddd494858.tar.bz2 |
[3.6] bpo-30450: Improved logic for obtaining dependencies (#2751)
Adds alternate download approach for nuget.exe
Fall back to git.exe if no Python is found. (#2739)
Also check whether git.exe is on PATH if it will be used.
Add support for HOST_PYTHON variable.
Clear internal environment variables used in find_python.bat
Use HOST_PYTHON as the actual Python if it is recent enough.
Adds HOST_PYTHON variable to AppVeyor configuration
Diffstat (limited to 'Tools/msi')
-rw-r--r-- | Tools/msi/buildrelease.bat | 3 | ||||
-rw-r--r-- | Tools/msi/get_externals.bat | 24 |
2 files changed, 4 insertions, 23 deletions
diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat index f60fe6a..1f52782 100644 --- a/Tools/msi/buildrelease.bat +++ b/Tools/msi/buildrelease.bat @@ -76,9 +76,6 @@ if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & if "%SKIPBUILD%" EQU "1" goto skipdoc if "%SKIPDOC%" EQU "1" goto skipdoc -if not defined PYTHON where py -q || echo Cannot find py on path and PYTHON is not set. && exit /B 1 -if not defined SPHINXBUILD where sphinx-build -q || echo Cannot find sphinx-build on path and SPHINXBUILD is not set. && exit /B 1 - call "%D%..\..\doc\make.bat" htmlhelp if errorlevel 1 goto :eof :skipdoc diff --git a/Tools/msi/get_externals.bat b/Tools/msi/get_externals.bat index aece81f..913512a 100644 --- a/Tools/msi/get_externals.bat +++ b/Tools/msi/get_externals.bat @@ -12,7 +12,7 @@ set DO_FETCH=true set DO_CLEAN=false :CheckOpts -if "%~1"=="--python" (set PYTHON_FOR_BUILD=%2) & shift & shift & goto CheckOpts +if "%~1"=="--python" (set PYTHON=%2) & shift & shift & goto CheckOpts if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts @@ -32,23 +32,7 @@ if "%DO_FETCH%"=="false" goto end if "%ORG%"=="" (set ORG=python) -if "%PYTHON_FOR_BUILD%"=="" ( - echo Checking for installed python... - py -3.6 -V >nul 2>&1 && (set PYTHON_FOR_BUILD=py -3.6) -) -if "%PYTHON_FOR_BUILD%"=="" ( - if NOT exist "%EXTERNALS_DIR%" mkdir "%EXTERNALS_DIR%" - if NOT exist "%NUGET%" ( - echo Downloading nuget... - rem NB: Must use single quotes around NUGET here, NOT double! - rem Otherwise, a space in the path would break things - powershell.exe -Command Invoke-WebRequest %NUGET_URL% -OutFile '%NUGET%' - ) - echo Installing Python via nuget... - "%NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%EXTERNALS_DIR%" - rem Quote it here; it's not quoted later because "py -3.6" wouldn't work - set PYTHON_FOR_BUILD="%EXTERNALS_DIR%\pythonx86\tools\python.exe" -) +call "%PCBUILD%\find_python.bat" "%PYTHON%" echo.Fetching external libraries... @@ -59,7 +43,7 @@ for %%e in (%libraries%) do ( echo.%%e already exists, skipping. ) else ( echo.Fetching %%e... - %PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -O %ORG% %%e + %PYTHON% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -O %ORG% %%e ) ) @@ -79,7 +63,7 @@ for %%b in (%binaries%) do ( echo.%%b already exists, skipping. ) else ( echo.Fetching %%b... - %PYTHON_FOR_BUILD% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -b -O %ORG% %%b + %PYTHON% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -b -O %ORG% %%b ) ) |