]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241)
authorSteve Dower <steve.dower@microsoft.com>
Wed, 27 Mar 2019 23:28:33 +0000 (16:28 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2019 23:28:33 +0000 (16:28 -0700)
PCbuild/get_externals.bat

index bda243fe2e311049b1d4349e1613a0c5e82dbd3d..ed6a79f11db67f9d84d353491738ae0d0d8c583d 100644 (file)
@@ -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 (