mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
14 lines
327 B
Plaintext
14 lines
327 B
Plaintext
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"
|
|
}
|