From: Steve Dower Date: Wed, 27 Mar 2019 23:28:33 +0000 (-0700) Subject: bpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241) X-Git-Tag: v2.7.17rc1~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb89aa24cf71f9874d1d26f3a2440fefa0b6bbcc;p=thirdparty%2FPython%2Fcpython.git bpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241) --- diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index bda243fe2e31..ed6a79f11db6 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -2,8 +2,8 @@ setlocal rem Simple script to fetch source for external libraries -if "%PCBUILD%"=="" (set PCBUILD=%~dp0) -if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals) +if NOT DEFINED PCBUILD (set PCBUILD=%~dp0) +if NOT DEFINED EXTERNALS_DIR (set EXTERNALS_DIR=%PCBUILD%\..\externals) set DO_FETCH=true set DO_CLEAN=false @@ -34,7 +34,7 @@ call "%PCBUILD%\find_python.bat" "%PYTHON%" git 2>&1 > nul if ERRORLEVEL 9009 ( - if "%PYTHON%"=="" ( + if NOT DEFINED PYTHON ( echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1 ) ) @@ -56,7 +56,7 @@ if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.5 for %%e in (%libraries%) do ( if exist "%EXTERNALS_DIR%\%%e" ( echo.%%e already exists, skipping. - ) else if "%PYTHON%"=="" ( + ) else if NOT DEFINED PYTHON ( echo.Fetching %%e with git... git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e" ) else ( @@ -74,7 +74,7 @@ if NOT "%IncludeSSL%"=="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%"=="" ( + ) else if NOT DEFINED PYTHON ( echo.Fetching %%b with git... git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b" ) else (