From 9ad8e016bfb9655088c89426d4066c3a9a6dd8dc Mon Sep 17 00:00:00 2001 From: Jack Doughty Date: Wed, 30 Oct 2024 11:58:03 +0000 Subject: [PATCH 1/3] Fixes genie python installation/uninstallation --- .../remove_genie_python.bat | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/installation_and_upgrade/remove_genie_python.bat b/installation_and_upgrade/remove_genie_python.bat index 0357417..96302bb 100644 --- a/installation_and_upgrade/remove_genie_python.bat +++ b/installation_and_upgrade/remove_genie_python.bat @@ -5,26 +5,34 @@ if "%~1"=="" ( goto ERROR ) -set substring=Python_Build_ -set path=%~1 -set modified_path=%path:%substring%=% +set remove_genie_python_path=%~1 -if "%path%" neq "%modified_path%" ( +REM Checks that supplied filepath exists. +if exist %remove_genie_python_path% ( - RMDIR /S /Q %path% + REM Checks that "Python_Build_" is in the supplied filepath, so it is a python build. + echo.%remove_genie_python_path% | findstr /C:"Python_Build_">nul && ( - set LATEST_PYTHON_DIR= - set LATEST_PYTHON= - set LATEST_PYTHON3= + REM Deleted directory tree + quiet. + RMDIR /S /Q %remove_genie_python_path% + + REM Unassigns environment variables. + set LATEST_PYTHON_DIR= + set LATEST_PYTHON= + set LATEST_PYTHON3= + + @echo Successfully removed "%remove_genie_python_path%" and unset genie build variables. + exit /b 0 + + ) || ( + @echo "%remove_genie_python_path%" is not a python build directory. + ) ) else ( - @echo Could not find the specified path: %path%. + @echo Could not find the specified path: "%remove_genie_python_path%". goto ERROR ) -@echo Successfully removed %path% and unset genie build variables. -exit /b 0 - :ERROR @echo remove_genie_python failed exit /b 1 From 75d5621344d6ac260188a51afb7a769ec709dbaf Mon Sep 17 00:00:00 2001 From: Jack Doughty Date: Wed, 30 Oct 2024 13:02:37 +0000 Subject: [PATCH 2/3] Fixes genie python installation/uninstallation --- installation_and_upgrade/remove_genie_python.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installation_and_upgrade/remove_genie_python.bat b/installation_and_upgrade/remove_genie_python.bat index 96302bb..0b20516 100644 --- a/installation_and_upgrade/remove_genie_python.bat +++ b/installation_and_upgrade/remove_genie_python.bat @@ -13,7 +13,7 @@ if exist %remove_genie_python_path% ( REM Checks that "Python_Build_" is in the supplied filepath, so it is a python build. echo.%remove_genie_python_path% | findstr /C:"Python_Build_">nul && ( - REM Deleted directory tree + quiet. + REM Deletes directory tree + quiet. RMDIR /S /Q %remove_genie_python_path% REM Unassigns environment variables. @@ -26,6 +26,7 @@ if exist %remove_genie_python_path% ( ) || ( @echo "%remove_genie_python_path%" is not a python build directory. + goto ERROR ) ) else ( From bb5e933d0989bf7ce7ac91d06ea38daf071847c3 Mon Sep 17 00:00:00 2001 From: Jack Doughty Date: Wed, 30 Oct 2024 13:20:57 +0000 Subject: [PATCH 3/3] LATEST_PYTHON was not getting defined --- installation_and_upgrade/define_latest_genie_python.bat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/installation_and_upgrade/define_latest_genie_python.bat b/installation_and_upgrade/define_latest_genie_python.bat index 25b7d1d..f765869 100644 --- a/installation_and_upgrade/define_latest_genie_python.bat +++ b/installation_and_upgrade/define_latest_genie_python.bat @@ -36,13 +36,11 @@ if "%~1" NEQ "" ( mkdir %LATEST_PYTHON_DIR% -%genie_dir%\BUILD-%PYTHON_BUILD_NO%\genie_python_install.bat %LATEST_PYTHON_DIR% +CALL %genie_dir%\BUILD-%PYTHON_BUILD_NO%\genie_python_install.bat %LATEST_PYTHON_DIR% set "LATEST_PYTHON=%LATEST_PYTHON_DIR%\python.exe" set "LATEST_PYTHON3=%LATEST_PYTHON_DIR%\python3.exe" -rem @echo LATEST PYTHON: %LATEST_PYTHON% - exit /b 0 :ERROR