Description
Is your feature request related to a problem? Please describe.
The pipenv run
is really handy. But it requires a good deal of work to actually make it work for situations where your current directory is not the same as where the Pipenv file is located.
Just for something like using it as a shorthand for running your python application that requires setting the PYTHONPATH
environment variable. It it is tricky to figure out what to actually set it to. And while it can be made easier by wrapping it in a shell script. Informing Pipenv where said script is located also becomes tricky
Describe the solution you'd like
The most simple solution I can think of would be having en environment variable (say, PIPENV_PROJECT_ROOT
). And could be used in places like the scripts section of Pipfile. And in scripts run from it.
Describe alternatives you've considered
For my problem it would also have been nice with a way to have Pipenv update the PYTHONPATH
environment variable to include a path relative to the project root. But just having the project root in the environment would likely solve more use cases