In cremig_setenv.bat NETWORK_INTERPRETER_PATH aufgenommen, damit bei Bedarf (z.B. wenn sich kein Python auf Rechner befindet) Interpreter auf U: genutzt werden kann. manage_interpreter.bat steuert zukünftig, welcher Interpreter gilt, d.h. wenn NETWORK_INTERPRETER_PATH in cremig_setenv.bat auskommentiert ist, wird Interpreter des virtual environments genutzt, wenn nicht auskommentiert gilt Interpreter auf U: + Mehrfaches voranstellen von CREMIG_BIN in Path wird nun verhindert bei mehrmaligem Aufruf von cremig_setenv.bat
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
@echo off
|
||||
CALL cremig_setenv.bat
|
||||
IF DEFINED NETWORK_INTERPRETER_PATH (
|
||||
goto %~1_network
|
||||
|
||||
) ELSE (
|
||||
goto %~1_local
|
||||
)
|
||||
|
||||
:activate_interpreter_local
|
||||
IF NOT EXIST %CREMIG%\.venv CALL %CREMIG_BIN%\install_py.bat
|
||||
CALL %CREMIG%\.venv\Scripts\activate.bat
|
||||
goto :eof
|
||||
|
||||
:deactivate_interpreter_local
|
||||
deactivate
|
||||
goto :eof
|
||||
|
||||
:activate_interpreter_network
|
||||
SET OLD_PATH=%PATH%
|
||||
SET PATH=%NETWORK_INTERPRETER_PATH%;%PATH%
|
||||
goto :eof
|
||||
|
||||
:deactivate_interpreter_network
|
||||
SET PATH=%OLD_PATH%
|
||||
SET OLD_PATH=
|
||||
SET NETWORK_INTERPRETER_PATH=
|
||||
goto :eof
|
||||
Reference in New Issue
Block a user