summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-07-17 13:43:55 (GMT)
committerGitHub <noreply@github.com>2017-07-17 13:43:55 (GMT)
commitefa26bcd5085279fc4e9ae96d052272a5214c2bd (patch)
tree4df2192daf7d5443ff4323f14bc55017a9c746e9
parent588836d3e646c2bcb3473cda7c5f6a1e0ff2c2e9 (diff)
downloadcpython-efa26bcd5085279fc4e9ae96d052272a5214c2bd.zip
cpython-efa26bcd5085279fc4e9ae96d052272a5214c2bd.tar.gz
cpython-efa26bcd5085279fc4e9ae96d052272a5214c2bd.tar.bz2
bpo-30450: Fall back to git.exe if no Python is found. (#2739)
* bpo-30450: Fall back to git.exe if no Python is found. * Also check whether git.exe is on PATH if it will be used.
-rw-r--r--PCbuild/get_externals.bat10
1 files changed, 10 insertions, 0 deletions
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index 01eeb84..1c0e9a0 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -41,6 +41,10 @@ if "%DO_FETCH%"=="false" goto end
if "%ORG%"=="" (set ORG=python)
call "%PCBUILD%find_python.bat" "%PYTHON%"
+if "%PYTHON%"=="" (
+ where /Q git || echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1
+)
+
echo.Fetching external libraries...
set libraries=
@@ -55,6 +59,9 @@ set libraries=%libraries% xz-5.2.2
for %%e in (%libraries%) do (
if exist "%EXTERNALS_DIR%\%%e" (
echo.%%e already exists, skipping.
+ ) else if "%PYTHON%"=="" (
+ echo.Fetching %%e with git...
+ git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e"
) else (
echo.Fetching %%e...
%PYTHON% "%PCBUILD%get_external.py" -O %ORG% %%e
@@ -71,6 +78,9 @@ if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06
for %%b in (%binaries%) do (
if exist "%EXTERNALS_DIR%\%%b" (
echo.%%b already exists, skipping.
+ ) else if "%PYTHON%"=="" (
+ echo.Fetching %%b with git...
+ git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b"
) else (
echo.Fetching %%b...
%PYTHON% "%PCBUILD%get_external.py" -b -O %ORG% %%b