-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
53 lines (42 loc) · 1.18 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# setup
# 08-16-2020 17:20:33 EDT
# (c) 2020 acamso
# https://direnv.net
# https://github.com/direnv/direnv/wiki/Python
if [[ -f pyproject.toml ]] && [[ -d ".venv" ]] && [[ ! $POETRY_ACTIVE ]]; then
# export VIRTUAL_ENV=$(poetry env info --path)
export VIRTUAL_ENV=".venv" # quicker
export POETRY_ACTIVE=1
PATH_add "$VIRTUAL_ENV/bin"
dotenv
# proj
export PROJ_DIR=$PWD
export PROJ_NAME=$(basename $PROJ_DIR)
# pkg
export PKG_NAME=$PROJ_NAME
export PKG_DIR=$PROJ_DIR/$PKG_NAME
# proj dirs
export DEBUG_DIR=$PROJ_DIR/debug
export DOCS_DIR=$PROJ_DIR/docs
export FILES_DIR=$PROJ_DIR/files
export LOGS_DIR=$PROJ_DIR/logs
export TESTS_DIR=$PROJ_DIR/tests
# proj dirs aliases
export DEBUG=$DEBUG_DIR
export DOCS=$DOCS_DIR
export FILES=$FILES_DIR
export LOGS=$LOGS_DIR
export TESTS=$TESTS_DIR
# pkg dirs
export CFG_DIR=$PKG_DIR/config
export EXTRA_DIR=$PKG_DIR/extra
# pkg dirs aliases
export CFG=$CFG_DIR
export EXTRA=$EXTRA_DIR
# cfg dirs
export CFG_PROJ_DIR=$CFG_DIR/proj
export CFG_CLI=$CFG_PROJ_DIR/cli.py
export CFG_LOG=$CFG_PROJ_DIR/log.py
clear
fi