#!/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 "$@"