mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
221722fb27
With inspiration from @KevinBrolly, this patch uses the stack image SQLite3 package but also still providing the dev headers and binary that users may still be using today. The benefit is that we won't need to rebuild all the python binaries for this to take affect. We can just stop shipping SQLite3 from future binaries. In addition, we don't need to worry about what version and when to update SQLite3 and maintaining the packages ourselves. This also includes updates to Python 2.7.15 and Python 3.6.6 so they can rebuilt with the stack image dev headers instead of building our own vendored SQLite3.
Python Buildpack Binaries
For Cedar-14 stack
To get started with it, create an app on Heroku inside a clone of this repository, and set your S3 config vars:
$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-python#not-heroku
$ heroku config:set WORKSPACE_DIR=builds
$ heroku config:set AWS_ACCESS_KEY_ID=<your_aws_key>
$ heroku config:set AWS_SECRET_ACCESS_KEY=<your_aws_secret>
$ heroku config:set S3_BUCKET=<your_s3_bucket_name>
Then, shell into an instance and run a build by giving the name of the formula inside builds:
$ heroku run bash
Running `bash` attached to terminal... up, run.6880
~ $ bob build runtimes/python-2.7.6
Fetching dependencies... found 2:
- libraries/sqlite
Building formula runtimes/python-2.7.6:
=== Building Python 2.7.6
Fetching Python v2.7.6 source...
Compiling...
If this works, run bob deploy instead of bob build to have the result uploaded to S3 for you.
To speed things up drastically, it'll usually be a good idea to heroku run bash --size PX instead.
For Heroku-16 stack
- Ensure GNU Make and Docker are installed.
- From the root of the buildpack repository, run:
make buildenv-heroku-16 - Follow the instructions displayed!
Enjoy :)