Skip to content

Commit

Permalink
direnv: look for setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent committed Dec 2, 2023
1 parent 49e5c0a commit 76fb400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .config/direnv/direnvrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ layout_auto() {
elif [[ -f pdm.lock ]]; then
log_status "detected pdm project"
layout pdm
elif [[ -f pyproject.toml ]]; then
elif [[ -f pyproject.toml || -f setup.py ]]; then
log_status "detected python project"
use python
layout python
Expand Down Expand Up @@ -88,7 +88,7 @@ layout_python() {
if [[ ! -d "$VIRTUAL_ENV" ]]; then
python3 -m venv "$VIRTUAL_ENV" --without-pip
echo "*" >"$VIRTUAL_ENV"/.gitignore
pip3 install -e .
pip3 install -e '.[dev]'
# shellcheck disable=SC2016
export_alias pip '"${VIRTUAL_ENV:?}/bin/python" -m pip "$@"' "$VIRTUAL_ENV/bin"
(cd "$VIRTUAL_ENV/bin" && ln -s pip pip3)
Expand Down

0 comments on commit 76fb400

Please sign in to comment.