@echo off
CALL setenv.bat
IF DEFINED NETWORK_INTERPRETER_PATH (
    goto %~1_network

) ELSE (
    goto %~1_local
)

:activate_interpreter_local
IF NOT EXIST %PROJECT%\.venv CALL %PROJECT_BIN%\install_py.bat
CALL %PROJECT%\.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%
CALL %PROJECT%\.venv\Scripts\activate.bat
goto :eof

:deactivate_interpreter_network
SET PATH=%OLD_PATH%
SET OLD_PATH=
SET NETWORK_INTERPRETER_PATH=
CALL %PROJECT%\.venv\Scripts\deactivate.bat
goto :eof
