Skip to content
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

Use venvs #420

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions activate_virtual_env.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
call "%~dp0.venv\Scripts\activate.bat"
set PYTHON3="%~dp0.venv\Scripts\python.exe"
set PYTHON3W="%~dp0.venv\Scripts\pythonw.exe"
9 changes: 9 additions & 0 deletions create_virtual_env.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if "%ICP_CONFIG_ENV_RUN%" == "" (
call C:\Instrument\Apps\EPICS\config_env.bat
) else (
@echo Using existing EPICS_ROOT %EPICS_ROOT%
)
del /q /s .venv >NUL 2>&1
%PYTHON3% -m venv .venv
call "%~dp0.venv\Scripts\activate.bat"
"%~dp0.venv\Scripts\pip.exe" install -r requirements.txt
2 changes: 2 additions & 0 deletions start_archiver_access_cmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ call %MYDIRBLOCK%..\..\..\config_env_base.bat
set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255

call %MYDIRBLOCK%activate_virtual_env.bat

set PYTHONUNBUFFERED=TRUE

%PYTHON3W% %MYDIRBLOCK%ArchiverAccess\archiver_access.py
2 changes: 2 additions & 0 deletions start_blockserver_cmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255
set EPICS_CA_MAX_ARRAY_BYTES=1000000

call %MYDIRBLOCK%activate_virtual_env.bat

set PYTHONUNBUFFERED=TRUE

set MYDIRGATE=%MYDIRBLOCK%..\..\..\gateway
Expand Down
2 changes: 2 additions & 0 deletions start_bs_to_kafka_cmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ call %MYDIRCD%..\..\..\config_env_base.bat
set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255

call %MYDIRBLOCK%activate_virtual_env.bat

set PYTHONUNBUFFERED=TRUE
@echo %DATE% %TIME% starting BS to Kafka
%PYTHON3W% %MYDIRCD%\BlockServerToKafka\main.py -d %INSTRUMENT%_sampleEnv -c forwarder_config -b livedata.isis.cclrc.ac.uk:9092 -p %MYPVPREFIX%
3 changes: 3 additions & 0 deletions start_database_server_cmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ call %MYDIRBLOCK%..\..\..\config_env_base.bat
set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255
set EPICS_CA_MAX_ARRAY_BYTES=10000000

call %MYDIRBLOCK%activate_virtual_env.bat

set PYTHONUNBUFFERED=TRUE
if exist "%PYTHON3W%" (
%PYTHON3W% %MYDIRBLOCK%DatabaseServer\database_server.py -od %MYDIRBLOCK%..\..\..\iocstartup
Expand Down
2 changes: 2 additions & 0 deletions start_remote_ioc_server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1
set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255
set EPICS_CA_MAX_ARRAY_BYTES=65536

call %MYDIRBLOCK%activate_virtual_env.bat

set PYTHONUNBUFFERED=TRUE

C:\instrument\apps\python3\python.exe %MYDIRBLOCK%RemoteIocServer\remote_ioc_server.py --pv_prefix %MYPVPREFIX%