Add files
This commit is contained in:
19
pythonVenv.sh
Executable file
19
pythonVenv.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
while getopts d: arg
|
||||
do
|
||||
case "${arg}" in
|
||||
d) TMP_DIR=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
|
||||
ENV_DIR="${TMP_DIR=/tmp}"/.venv
|
||||
|
||||
if [ -d "${ENV_DIR}" ]; then
|
||||
. "${ENV_DIR}"/bin/activate
|
||||
else
|
||||
python3 -m venv "${ENV_DIR}"
|
||||
. "${ENV_DIR}"/bin/activate
|
||||
pip3 install wheel pyyaml jinja2-cli yamllint Cerberus
|
||||
fi
|
||||
24
readme.md
Normal file
24
readme.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# venv for ecmccfg
|
||||
This dir contains a python venv that is needed for ecmccfg when using yaml files (motion or plc cfgs).
|
||||
|
||||
## Generate the venv
|
||||
|
||||
Use pythonVenv.sh to generate an ecmc venv in current dir (the script is copied from ecmccfg/scripts/jinja2/):
|
||||
```
|
||||
bash pythonVenv.sh -d .
|
||||
```
|
||||
|
||||
The env should then be copied to /ioc/NeedfulThings/ecmc_python_venv/:
|
||||
|
||||
```
|
||||
[sls-lc8 ioc]$ ls -la /ioc/NeedfulThings/ecmc_python_venv/.venv
|
||||
total 32
|
||||
drwxrwsr-x. 7 sandst_a unx-sls_ioc 4096 May 3 16:07 .
|
||||
drwxrwsr-x. 3 sandst_a unx-sls_ioc 4096 May 3 17:47 ..
|
||||
drwxrwxr-x. 2 sandst_a unx-sls_ioc 4096 May 3 16:06 bin
|
||||
drwxrwxr-x. 2 sandst_a unx-sls_ioc 4096 May 3 16:07 include
|
||||
drwxrwsr-x. 3 sandst_a unx-sls_ioc 4096 May 3 16:06 lib
|
||||
drwxrwxr-x. 3 sandst_a unx-sls_ioc 4096 May 3 16:06 lib64
|
||||
-rw-rw-r--. 1 sandst_a unx-sls_ioc 69 May 3 16:07 pyvenv.cfg
|
||||
drwxrwxr-x. 3 sandst_a unx-sls_ioc 4096 May 3 16:06 share
|
||||
```
|
||||
Reference in New Issue
Block a user