Skip to content

Commit a6d6cfd

Browse files
committed
DOS clean-up with openai: Adding Pre-requisite Packages
1 parent 515af52 commit a6d6cfd

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

generate_a_winpython_distro.bat

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,22 @@ if not exist "%WINPYDIRBASE%\scripts\env.bat" (
9292
exit /b 1
9393
)
9494

95+
REM === Step: Add pre-requisite packages ===
9596
call :log_section Add pre-requisite packages
9697

97-
set path=%my_original_path%
98-
call %my_WINPYDIRBASE%\scripts\env.bat
98+
set "path=%my_original_path%"
99+
call "%my_WINPYDIRBASE%\scripts\env.bat"
99100

100101
rem python -m ensurepip
101-
rem insta essential packages
102-
python -m pip install --upgrade pip setuptools wheel wppm -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links% >>%my_archive_log%
102+
REM Upgrade essential pip tools
103+
python -m pip install --upgrade pip setuptools wheel wppm -c "%my_constraints%" --pre --no-index --trusted-host=None --find-links="%my_find_links%" >>"%my_archive_log%"
103104

104-
rem Install complementary pre-requirements if any
105-
if not "Z%my_requirements_pre%Z"=="ZZ" (
106-
if "%my_find_links_pre%"=="" set my_find_links_pre=%my_find_links%
107-
python -m pip install -r %my_requirements_pre% -c %my_constraints% --pre --no-index --trusted-host=None --find-links=%my_find_links_pre% >> %my_archive_log%
105+
REM Install additional pre-requirements if specified
106+
if defined my_requirements_pre (
107+
if not defined my_find_links_pre set "my_find_links_pre=%my_find_links%"
108+
python -m pip install -r "%my_requirements_pre%" -c "%my_constraints%" --pre --no-index --trusted-host=None --find-links="%my_find_links_pre%" >>"%my_archive_log%"
108109
) else (
109-
echo "No pre-requisite packages">>%my_archive_log%
110+
echo No pre-requisite packages specified >>"%my_archive_log%"
110111
)
111112

112113
call :log_section Add requirement packages

0 commit comments

Comments
 (0)