Skip to content

Commit bb89aa2

Browse files
authored
bpo-36245: Avoid problems when building in a directory containing spaces. (GH-12241)
1 parent 600aca4 commit bb89aa2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

PCbuild/get_externals.bat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
setlocal
33
rem Simple script to fetch source for external libraries
44

5-
if "%PCBUILD%"=="" (set PCBUILD=%~dp0)
6-
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%PCBUILD%\..\externals)
5+
if NOT DEFINED PCBUILD (set PCBUILD=%~dp0)
6+
if NOT DEFINED EXTERNALS_DIR (set EXTERNALS_DIR=%PCBUILD%\..\externals)
77

88
set DO_FETCH=true
99
set DO_CLEAN=false
@@ -34,7 +34,7 @@ call "%PCBUILD%\find_python.bat" "%PYTHON%"
3434

3535
git 2>&1 > nul
3636
if ERRORLEVEL 9009 (
37-
if "%PYTHON%"=="" (
37+
if NOT DEFINED PYTHON (
3838
echo Python 3.6 could not be found or installed, and git.exe is not on your PATH && exit /B 1
3939
)
4040
)
@@ -56,7 +56,7 @@ if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.5
5656
for %%e in (%libraries%) do (
5757
if exist "%EXTERNALS_DIR%\%%e" (
5858
echo.%%e already exists, skipping.
59-
) else if "%PYTHON%"=="" (
59+
) else if NOT DEFINED PYTHON (
6060
echo.Fetching %%e with git...
6161
git clone --depth 1 https://github.com/%ORG%/cpython-source-deps --branch %%e "%EXTERNALS_DIR%\%%e"
6262
) else (
@@ -74,7 +74,7 @@ if NOT "%IncludeSSL%"=="false" set binaries=%binaries% nasm-2.11.06
7474
for %%b in (%binaries%) do (
7575
if exist "%EXTERNALS_DIR%\%%b" (
7676
echo.%%b already exists, skipping.
77-
) else if "%PYTHON%"=="" (
77+
) else if NOT DEFINED PYTHON (
7878
echo.Fetching %%b with git...
7979
git clone --depth 1 https://github.com/%ORG%/cpython-bin-deps --branch %%b "%EXTERNALS_DIR%\%%b"
8080
) else (

0 commit comments

Comments
 (0)