heroku-buildpack-python
heroku-buildpack-python copied to clipboard
Dependencies not cached while using Pipfile
Hi! Running into a strange issue where even if my Pipfile doesn't change, Heroku re-installs all dependencies. My root directory contains Pipfile and Pipfile.lock and does not have a requirements.txt file. For some reason, Heroku tries to look for a requirements.txt file in the build cache, and when it doesn't find one, re-installs all dependencies despite nothing having changed.
-----> Python app detected
cp: cannot stat '/tmp/build_ed7c4d42035089418cce3a17e584027e/requirements.txt': No such file or directory
-----> Installing python-3.6.10
-----> Installing pip
-----> Installing dependencies with Pipenv 2018.5.18…
Installing dependencies from Pipfile.lock (103a4e)…
Fixed in #1130
Note you still need a requirements.txt file even if it's empty
Left some questions about Pipenv's behaviour in: https://github.com/heroku/heroku-buildpack-python/pull/1130#pullrequestreview-631242455