Example usage, first create a Heroku app:
$ heroku create
This buildpack depends on the official Heroku Python buildpack, so you need to configure your app with support for multiple buildpacks.
$ heroku buildpacks:add heroku/python $ heroku buildpacks:add https://github.com/niteoweb/heroku-buildpack-buildout.git
requirements.txt file to install the wanted version of
zc.buildout. The Heroku Python buildpack know how to use pip to install libraries listed in
requirements.txt so you just need to add the file.
The buildpack will detect your app as a Buildout-powered-Python app if the repo has the
buildout.cfg file in root. The buildpack will use Python compiled by heroku-buildpack-python to run Buildout to build your environment.
$ cat buildout.cfg [buildout] relative-paths = true ...
Note that you have to set
relative-paths = true in your
Next, you need to tell Heroku how to run your app once Buildout builds it:
$ cat Procfile bin/<your app start command>
Lastly, push your changes to Heroku to build your app:
$ git push heroku master ... -----> Fetching custom git buildpack... done -----> Buildout app detected -----> Use build cache -----> Read BUILDOUT_CFG from env vars, or use default -----> Read BUILDOUT_VERBOSITY from env vars, or use default -----> Init buildout ... -----> Run bin/buildout -c buildout.cfg ... -----> Copy results to cache -----> Copy results to slug Done -----> Discovering process types Procfile declares types -> web
You can set an arbitrary Python version with a
$ cat runtime.txt python-3.5.0
Other runtimes are available as well.
To increase the Buildout's verbosity, set the following environment variable:
$ heroku config:add BUILDOUT_VERBOSITY=-v
You can increase verbosity up to
To run an arbitrary *.cfg file such as
heroku.cfg, set the following environment variable:
$ heroku config:add BUILDOUT_CFG=heroku.cfg
Remember that you have to set
relative-paths = true in your arbitrary *.cfg file.
At Niteo we regularly contribute back to the Open Source community. If you do too, we'd like to invite you to join our team!
Copy the snippet above into CLI.