Skip to content

Commit

Permalink
feat(.envrc): add project setup and activation script
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Mar 1, 2024
1 parent 92b25ca commit 17f24a0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 17f24a0

Please sign in to comment.