HPI/with_my.example
2019-10-11 23:07:45 +01:00

20 lines
506 B
Bash
Executable file

#!/bin/bash -eu
# set path to directory containing my_configuration.py file here
# it can also be directory containing my_configuration package with __init__.py inside etc.
MY_CONFIGURATION_DIR=
if [[ -n "${PYTHONPATH:=}" ]]; then
PREV=":$PYTHONPATH"
else
PREV=""
fi
MY_DIR="$(dirname "$(readlink -f "$0")")"
export PYTHONPATH="$MY_CONFIGURATION_DIR:$MY_DIR""$PREV"
# TODO wonder why py.typed file in my_configuration didn't help?
export MYPYPATH="$MY_CONFIGURATION_DIR:$MY_DIR"
exec "$@"