Fix Heroku deployment by pre-installing compatible setuptools version #816
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To address the Heroku deployment issue seen in https://dashboard.heroku.com/apps/network-pulse-api-staging/activity/builds/55e531d0-2910-41b3-be70-1c0c23b6093e
Heroku installs a recent version of setuptools (70.x) before running
pip install -r requirements.txt, which causes an import error indjango-allauth==0.48.0. This is because newer versions of setuptools have removedconvert_path, which allauth's setup.py still relies on.Although
setuptools==65.5.1is already pinned in our requirements, Heroku doesn't respect that pin early enough during the build process.To fix this, this PR introduces a
.profilescript that Heroku runs at dyno startup. It explicitly installssetuptools==65.5.1before any other dependencies are installed.This change has no effect on local environments.
.profileis only executed by Heroku.