use direnv instead of poetry

This commit is contained in:
Noah Masur
2022-01-25 11:22:42 -05:00
parent 2177397947
commit 41eff7f1d8
3 changed files with 16 additions and 8 deletions

13
direnvrc.symlink Normal file
View File

@ -0,0 +1,13 @@
layout_poetry() {
if [[ ! -f pyproject.toml ]]; then
log_error 'No pyproject.toml found. Use `poetry new` or `poetry init` to create one first.'
exit 2
fi
# create venv if it doesn't exist
poetry run true
export VIRTUAL_ENV=$(poetry env info --path)
export POETRY_ACTIVE=1
PATH_add "$VIRTUAL_ENV/bin"
}