diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..155058b --- /dev/null +++ b/.envrc @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring" +export PROJECT_NAME="course-template" +PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +export PROJECT_ROOT +VIRTUAL_ENV="${WORKON_HOME}/${PROJECT_NAME}" +if [ -e "${VIRTUAL_ENV}/bin/activate" ]; then + # shellcheck disable=SC1091 + source "${VIRTUAL_ENV}/bin/activate" +else + python3 -m venv "${VIRTUAL_ENV}" + # shellcheck disable=SC1091 + source "${VIRTUAL_ENV}/bin/activate" + pip install --upgrade pip setuptools wheel +fi