Use symlink for hypexport

This commit is contained in:
Dima Gerasimov 2019-10-08 21:06:50 +01:00
parent 90f4587cc8
commit af810eb325
4 changed files with 56 additions and 44 deletions

View file

@ -1,7 +1,8 @@
#!/bin/bash -eu
# set path to my_configuration.py file here
MY_CONFIGURATION_PATH=
# 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
@ -11,7 +12,9 @@ else
fi
MY_DIR="$(dirname "$(readlink -f "$0")")"
MY_CONFIGURATION_DIR="$(dirname "$(readlink -f "$MY_CONFIGURATION_PATH")")"
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"
exec "$@"