* Add a test for the cryptography (cffi) compile step Since it's currently untested. * Skip vendoring libffi/libmemcached on Heroku-16 Unlike for Cedar-14, Heroku-16 comes with these packages pre-installed: https://github.com/heroku/stack-images/blob/5a341970cfc1f201014262ad64c3b3e47514f663/heroku-16/installed-packages.txt#L111 https://github.com/heroku/stack-images/blob/5a341970cfc1f201014262ad64c3b3e47514f663/heroku-16/installed-packages.txt#L172 As such the build scripts had already been made a no-op on Heroku-16: https://github.com/heroku/heroku-buildpack-python/blob/fedae5ceda5a42f594012f911c3808dd5dc6fd9e/builds/libraries/vendor/libffi#L6-L9 https://github.com/heroku/heroku-buildpack-python/blob/fedae5ceda5a42f594012f911c3808dd5dc6fd9e/builds/libraries/vendor/libmemcache#L6-L9 ...meaning the Heroku-16 archives for them on S3 contain zero files. However until now, the buildpack was still unnecessarily downloading and extracting these empty archives - and not just on the first compile (like on cedar-14), but every compile since the directory check will never succeed.
Heroku Buildpack: Python
This is the official Heroku buildpack for Python apps, powered by Pipenv, pip and other excellent software.
Recommended web frameworks include Django and Flask. The recommended webserver is Gunicorn. There are no restrictions around what software can be used (as long as it's pip-installable). Web processes must bind to $PORT, and only the HTTP protocol is permitted for incoming connections.
Some Python packages with obscure C dependencies are not compatible.
See it in Action
Deploying a Python application couldn't be easier:
$ ls
Pipfile Procfile web.py
$ heroku create --buildpack heroku/python
$ git push heroku master
...
-----> Python app detected
-----> Installing python-3.6.2
-----> Installing pip
-----> Installing requirements with latest pipenv...
...
Installing dependencies from Pipfile...
-----> Discovering process types
Procfile declares types -> (none)
A Pipfile or requirements.txt must be present at the root of your application's repository.
You can also specify the latest production release of this buildpack for upcoming builds of an existing application:
$ heroku buildpacks:set heroku/python
Specify a Python Runtime
Specific versions of the Python runtime can be specified with a runtime.txt file:
$ cat runtime.txt
python-2.7.13
Runtime options include:
python-3.6.2python-2.7.13pypy-5.7.1(unsupported, experimental)pypy3-5.5.1(unsupported, experimental)
