I want pipenv to create its virtualenv in $PROJECTDIR/.venv
automatically for everyone who checks out the project.
So far, I see only the following options working, none of which is satisfying:
- Ask users to set PIPENV_VENV_IN_PROJECT=1 globally, forcing my project preferences on each of their other projects.
- Ask users to always invoke pipenv via "
PIPENV_VENV_IN_PROJECT=1 pipenv
" when inside my project, which begs for trouble if they run apipenv
command and forget to setPIPENV_VENV_IN_PROJECT
. - Ask users to install a third-party tool
direnv
and provide an.envrc
file, adding yet another non-obvious build dependency.
I tried the following approaches:
- Add an PIPENV_VENV_IN_PROJECT-like option to Pipfile, but I couldn't find any such Pipfile option.
- Put "
PIPENV_VENV_IN_PROJECT=1
" into$PROJECTDIR/.env
, but that is only evaluated inside the sub shell ofpipenv shell/run
, and is ignored bypipenv
itself.
So, how do I set PIPENV_VENV_IN_PROJECT on per-project basis?