Pfadfeststellung ist nur noch in manage_interpreter.bat. Aufrufende Skripte etwas umgebaut

This commit is contained in:
2026-04-08 12:17:16 +02:00
parent fb25aca5ce
commit 0defdc24cc
10 changed files with 102 additions and 34 deletions
+35
View File
@@ -0,0 +1,35 @@
@echo off
CALL "%~dp0setenv.bat"
IF /I "%1"=="activate" GOTO activate
IF /I "%1"=="deactivate" GOTO deactivate
IF /I "%1"=="activate_interpreter" GOTO activate
IF /I "%1"=="deactivate_interpreter" GOTO deactivate
GOTO :eof
:activate
REM Interpreter wählen
IF DEFINED NETWORK_PYTHON (
SET PYTHON_EXE=%NETWORK_PYTHON%\python.exe
) ELSE (
SET PYTHON_EXE=python
)
REM venv sicherstellen
IF NOT EXIST "%PROJECT%\.venv" (
"%PYTHON_EXE%" -m venv "%PROJECT%\.venv"
)
REM venv aktivieren
CALL "%PROJECT%\.venv\Scripts\activate.bat"
REM Interpreter festnageln
SET VIRTUAL_ENV_PYTHON=%PYTHON_EXE%
GOTO :eof
:deactivate
CALL "%PROJECT%\.venv\Scripts\deactivate.bat"
SET VIRTUAL_ENV_PYTHON=
GOTO :eof