-
Notifications
You must be signed in to change notification settings - Fork 10
/
.envrc
28 lines (25 loc) · 1.05 KB
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ===========================================================================
# PROJECT ENVIRONMENT SETUP: .envrc
# ===========================================================================
# SHELL: bash (or similiar)
# REQUIRES: direnv >= 2.26.0 -- Needed for: source_env_if_exists, ...
# USAGE:
# # -- BETTER: Use direnv (requires: Setup in bash -- $HOME/.bashrc)
# # BASH PROFILE NEEDS: eval "$(direnv hook bash)"
# direnv allow .
#
# SIMPLISTIC ALTERNATIVE (without cleanup when directory scope is left again):
# source .envrc
#
# SEE ALSO:
# * https://direnv.net/
# * https://peps.python.org/pep-0582/ Python local packages directory
# ===========================================================================
# MAYBE: HERE="${PWD}"
# -- USE OPTIONAL PARTS (if exist/enabled):
# PREPARED: dotenv_if_exists .env
source_env_if_exists .envrc.use_venv
# -- SETUP-PYTHON: Prepend ${HERE} to PYTHONPATH (as PRIMARY search path)
# SIMILAR TO: export PYTHONPATH="${HERE}:${PYTHONPATH}"
path_add PYTHONPATH .
# PREPARED: source_env_if_exists .envrc.override