Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 585 Bytes
# -*- mode: sh -*-
export PIPENV_VENV_IN_PROJECT=true
# TODO: Remove the copy-n-paste from direnv's stdlib when everybody uses at least
# direnv 2.14.0 (i.e. at least Ubuntu bionic)
if ! has layout_pipenv; then
layout_pipenv() {
if [[ ! -f Pipfile ]]; then
log_error 'No Pipfile found. Use `pipenv` to create a Pipfile first.'
exit 2
fi
local VENV=$(pipenv --bare --venv 2>/dev/null)
if [[ -z $VENV || ! -d $VENV ]]; then
pipenv install --dev
fi
export VIRTUAL_ENV=$(pipenv --venv)
PATH_add "$VIRTUAL_ENV/bin"
export PIPENV_ACTIVE=1
}
fi
layout pipenv
You can’t perform that action at this time.