Googling reveals some people adding a Heroku config variable like so:
heroku config:add PYTHONPATH=...
I don't like this solution for 2 reasons. First, I have to already know the existing
$PYTHONPATH and well as the path to my code. Second, this directory is not a configuration detail; it will always be the same regardless of where I deploy.
The solution I ended up with is to simply set the
PYTHONPATH variable in my
Procfile using the
web: env PYTHONPATH=$PYTHONPATH:$PWD/src gunicorn app:app