Skip to content

DOS clean-up with openai: Clean up Pre-clear Build Infrastructure #1687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions generate_a_winpython_distro.bat
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,27 @@ set my_buildenv=C:\WinPdev\WPy64-310111

call :log_section preparing winPython for %my_pyver% (%my_python_target%)release %my_release%%my_flavor% (%my_release_level%) *** %my_arch% bit ***

rem Pre-clear previous build infrastructure
if "%my_preclear_build_directory%"=="Yes" (
echo "(%date% %time%) Pre-clear previous build infrastructure">>%my_archive_log%
del -y %userprofile%\.jupyter\jupyter_notebook_config.py
cd /D %my_root_dir_for_builds%\bd%my_python_target%
set build_det=\%my_flavor%
if "%my_flavor%"=="" set build_det=
dir %build_det%
ren bu%my_flavor% bu%my_flavor%_old
start rmdir /S /Q bu%my_flavor%_old
rmdir /S /Q bu%my_flavor%
rmdir /S /Q dist
REM === Step: Pre-clear previous build infrastructure ===

if /i "%my_preclear_build_directory%"=="Yes" (
call :log_section Pre-clear previous build infrastructure

REM Delete Jupyter config if it exists
if exist "%userprofile%\.jupyter\jupyter_notebook_config.py" (
del /f /q "%userprofile%\.jupyter\jupyter_notebook_config.py"
)

REM Navigate to build directory
cd /D "%my_root_dir_for_builds%\bd%my_python_target%"

REM Rename previous build folder if it exists
if exist "bu%my_flavor%" (
ren "bu%my_flavor%" "bu%my_flavor%_old"
rmdir /s /q "bu%my_flavor%_old"
)
)


call :log_section Create a new build

cd /D %~dp0
Expand Down