Now that we've switched from installing app dependencies into user site-packages to installing them into a venv (in #257), this workaround should no longer be necessary.
However, we will also need to handle the case where an app is setting an invalid value for PYTHONHOME (which will be the case for very old Heroku apps, due to historic classic Python buildpack versions setting app level env vars via the bin/releases API). To do that we'll probably want to just error if such an env var is set, and tell users to unset it.
In #25 we started setting
PYTHONHOME
to work around this bug in uWSGI: https://github.com/unbit/uwsgi/issues/2525Now that we've switched from installing app dependencies into user site-packages to installing them into a venv (in #257), this workaround should no longer be necessary.
We should confirm this is the case, and if so, stop setting
PYTHONHOME
here: https://github.com/heroku/buildpacks-python/blob/53eabc7734f0027a62978eff61b95a51199a6895/src/layers/python.rs#L201-L214However, we will also need to handle the case where an app is setting an invalid value for
PYTHONHOME
(which will be the case for very old Heroku apps, due to historic classic Python buildpack versions setting app level env vars via thebin/releases
API). To do that we'll probably want to just error if such an env var is set, and tell users to unset it.