Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle the case where there are multiple bundled pip wheels (#1444)
In some older versions of Python multiple pip wheels have been accidentally bundled with the Python stdlib upstream. For example in Python 3.9.0 (which has been superseded by newer patch versions of Python 3.9.x): https://github.com/python/cpython/tree/v3.9.0/Lib/ensurepip/_bundled After #1442, this results in eg: ``` -----> Installing pip 23.1.2, setuptools 67.7.2 and wheel 0.40.0 /app/.heroku/python/bin/python: can't open file '/build/.heroku/python/lib/python3.9/ensurepip/_bundled/pip-20.2.1-py2.py3-none-any.whl .heroku/python/lib/python3.9/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl/pip': [Errno 2] No such file or directory ``` Whilst these affected Python versions are old/insecure and not available on newer stacks, we should still make sure they work as expected. As such, the lookup of the bundled pip wheel needs to handle this case, which it now does by just picking the first found pip wheel. This was spotted via https://heroku.support/1245122, which was from an app using the `main` branch of this buildpack (since #1442 hasn't yet been released to the buildpack registry). GUS-W-13111316.
- Loading branch information