@@ -49,12 +49,10 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"
49
49
50
50
@ rem ################################
51
51
@ 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"
54
54
)
55
-
56
55
set " PIP_EXTRA_ARGS = %PIP_EXTRA_ARGS% --find-links https://thirdparty.aboutcode.org/pypi" & %INDEX_ARG%
57
- @ rem ################################
58
56
59
57
60
58
@ rem ################################
@@ -94,8 +92,8 @@ set "PIP_EXTRA_ARGS=%PIP_EXTRA_ARGS% %NO_INDEX%"
94
92
@ rem # Otherwise the latest Python by default.
95
93
if not defined PYTHON_EXECUTABLE (
96
94
@ 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"
99
97
) else (
100
98
set " PYTHON_EXECUTABLE = py"
101
99
)
@@ -107,22 +105,22 @@ if not defined PYTHON_EXECUTABLE (
107
105
@ rem # presence is not consistent across Linux distro and sometimes pip is not
108
106
@ rem # included either by default. The virtualenv.pyz app cures all these issues.
109
107
110
- if not exist " " %CFG_BIN_DIR% \python.exe" " (
108
+ if not exist " %CFG_BIN_DIR% \python.exe" (
111
109
if not exist " %CFG_BIN_DIR% " (
112
- mkdir %CFG_BIN_DIR%
110
+ mkdir " %CFG_BIN_DIR% "
113
111
)
114
112
115
- if exist " " %CFG_ROOT_DIR% \etc\thirdparty\virtualenv.pyz" " (
113
+ if exist " %CFG_ROOT_DIR% \etc\thirdparty\virtualenv.pyz" (
116
114
%PYTHON_EXECUTABLE% " %CFG_ROOT_DIR% \etc\thirdparty\virtualenv.pyz" ^
117
115
--wheel embed --pip embed --setuptools embed ^
118
116
--seeder pip ^
119
117
--never-download ^
120
118
--no-periodic-update ^
121
119
--no-vcs-ignore ^
122
120
%CFG_QUIET% ^
123
- %CFG_ROOT_DIR% \%VIRTUALENV_DIR%
121
+ " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% "
124
122
) else (
125
- if not exist " " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \virtualenv.pyz" " (
123
+ if not exist " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \virtualenv.pyz" (
126
124
curl -o " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \virtualenv.pyz" %VIRTUALENV_PYZ_URL%
127
125
128
126
if %ERRORLEVEL% neq 0 (
@@ -136,7 +134,7 @@ if not exist ""%CFG_BIN_DIR%\python.exe"" (
136
134
--no-periodic-update ^
137
135
--no-vcs-ignore ^
138
136
%CFG_QUIET% ^
139
- %CFG_ROOT_DIR% \%VIRTUALENV_DIR%
137
+ " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% "
140
138
)
141
139
)
142
140
@@ -152,7 +150,7 @@ if %ERRORLEVEL% neq 0 (
152
150
@ rem # speeds up the installation.
153
151
@ rem # We always have the PEP517 build dependencies installed already.
154
152
155
- %CFG_BIN_DIR% \pip install ^
153
+ " %CFG_BIN_DIR% \pip" install ^
156
154
--upgrade ^
157
155
--no-build-isolation ^
158
156
%CFG_QUIET% ^
@@ -163,7 +161,7 @@ if %ERRORLEVEL% neq 0 (
163
161
if exist " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \bin" (
164
162
rmdir /s /q " %CFG_ROOT_DIR% \%VIRTUALENV_DIR% \bin"
165
163
)
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"
167
165
168
166
if %ERRORLEVEL% neq 0 (
169
167
exit /b %ERRORLEVEL%
@@ -204,4 +202,4 @@ for %%F in (%CLEANABLE%) do (
204
202
rmdir /s /q " %CFG_ROOT_DIR% \%%F " > nul 2 >& 1
205
203
del /f /q " %CFG_ROOT_DIR% \%%F " > nul 2 >& 1
206
204
)
207
- exit /b 0
205
+ exit /b 0
0 commit comments