@@ -49,12 +49,10 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"
4949
5050@ rem ################################
5151@ rem # Thirdparty package locations and index handling
52- if exist " " %CFG_ROOT_DIR% \thirdparty" " (
53- set " PIP_EXTRA_ARGS = --find-links %CFG_ROOT_DIR% \thirdparty "
52+ if exist " %CFG_ROOT_DIR% \thirdparty" (
53+ set PIP_EXTRA_ARGS = --find-links " %CFG_ROOT_DIR% \thirdparty"
5454)
55-
5655set " PIP_EXTRA_ARGS = %PIP_EXTRA_ARGS% --find-links https://thirdparty.aboutcode.org/pypi" & %INDEX_ARG%
57- @ rem ################################
5856
5957
6058@ rem ################################
@@ -94,8 +92,8 @@ set "PIP_EXTRA_ARGS=%PIP_EXTRA_ARGS% %NO_INDEX%"
9492@ rem # Otherwise the latest Python by default.
9593if not defined PYTHON_EXECUTABLE (
9694 @ rem # check for a file named PYTHON_EXECUTABLE
97- if exist " " %CFG_ROOT_DIR% \PYTHON_EXECUTABLE" " (
98- set /p PYTHON_EXECUTABLE = < " " %CFG_ROOT_DIR% \PYTHON_EXECUTABLE" "
95+ if exist " %CFG_ROOT_DIR% \PYTHON_EXECUTABLE" (
96+ set /p PYTHON_EXECUTABLE = < " %CFG_ROOT_DIR% \PYTHON_EXECUTABLE"
9997 ) else (
10098 set " PYTHON_EXECUTABLE = py"
10199 )
@@ -107,22 +105,22 @@ if not defined PYTHON_EXECUTABLE (
107105@ rem # presence is not consistent across Linux distro and sometimes pip is not
108106@ rem # included either by default. The virtualenv.pyz app cures all these issues.
109107
110- if not exist " " %CFG_BIN_DIR% \python.exe" " (
108+ if not exist " %CFG_BIN_DIR% \python.exe" (
111109 if not exist " %CFG_BIN_DIR% " (
112- mkdir %CFG_BIN_DIR%
110+ mkdir " %CFG_BIN_DIR% "
113111 )
114112
115- if exist " " %CFG_ROOT_DIR% \etc\thirdparty\virtualenv.pyz" " (
113+ if exist " %CFG_ROOT_DIR% \etc\thirdparty\virtualenv.pyz" (
116114 %PYTHON_EXECUTABLE% " %CFG_ROOT_DIR% \etc\thirdparty\virtualenv.pyz" ^
117115 --wheel embed --pip embed --setuptools embed ^
118116 --seeder pip ^
119117 --never-download ^
120118 --no-periodic-update ^
121119 --no-vcs-ignore ^
122120 %CFG_QUIET% ^
123- %CFG_ROOT_DIR% \%VIRTUALENV_DIR%
121+ " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% "
124122 ) else (
125- if not exist " " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \virtualenv.pyz" " (
123+ if not exist " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \virtualenv.pyz" (
126124 curl -o " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \virtualenv.pyz" %VIRTUALENV_PYZ_URL%
127125
128126 if %ERRORLEVEL% neq 0 (
@@ -136,7 +134,7 @@ if not exist ""%CFG_BIN_DIR%\python.exe"" (
136134 --no-periodic-update ^
137135 --no-vcs-ignore ^
138136 %CFG_QUIET% ^
139- %CFG_ROOT_DIR% \%VIRTUALENV_DIR%
137+ " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% "
140138 )
141139)
142140
@@ -152,7 +150,7 @@ if %ERRORLEVEL% neq 0 (
152150@ rem # speeds up the installation.
153151@ rem # We always have the PEP517 build dependencies installed already.
154152
155- %CFG_BIN_DIR% \pip install ^
153+ " %CFG_BIN_DIR% \pip" install ^
156154 --upgrade ^
157155 --no-build-isolation ^
158156 %CFG_QUIET% ^
@@ -163,7 +161,7 @@ if %ERRORLEVEL% neq 0 (
163161if exist " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \bin" (
164162 rmdir /s /q " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \bin"
165163)
166- mklink /J %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \bin %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \Scripts
164+ mklink /J " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \bin" " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \Scripts"
167165
168166if %ERRORLEVEL% neq 0 (
169167 exit /b %ERRORLEVEL%
@@ -204,4 +202,4 @@ for %%F in (%CLEANABLE%) do (
204202 rmdir /s /q " %CFG_ROOT_DIR% \%%F " > nul 2 >& 1
205203 del /f /q " %CFG_ROOT_DIR% \%%F " > nul 2 >& 1
206204)
207- exit /b 0
205+ exit /b 0
0 commit comments