by huxley

GitHub Readme.md

Heroku buildpack: Python with SWIG

SWIG install based on work done by Guy Bowden https://github.com/guybowden/heroku-buildpack-python-paybox but updated to use a more recent Python Buildpack (currently v51)

This is a Heroku buildpack for Python apps, powered by pip with an additional install for SWIG which provides M2Crypto support.


Example usage:

$ ls
Procfile  requirements.txt  runtime.txt

$ heroku create --stack cedar --buildpack git://github.com/huxley/heroku-buildpack-SWIG-python.git

$ git push heroku master
-----> Fetching custom git buildpack... done
-----> Python app detected
-----> Fetching and installing SWIG 2
-----> Installing ...
        SWIG installed
        updating path...
        setting SWIG_LIB environment var
-----> Preparing Python runtime (python-2.7.8)

        ... yadda yadda ...
       Cleaning up...

You can also add it to upcoming builds of an existing application:

$ heroku config:add BUILDPACK_URL=git://github.com/huxley/heroku-buildpack-SWIG-python.git

The buildpack will detect your app as Python if it has the file requirements.txt in the root.

It will use Pip to install your dependencies, vendoring a copy of the Python runtime into your slug.

Specify a Runtime

You can also provide arbitrary releases Python with a runtime.txt file.

$ cat runtime.txt

Runtime options include:

  • python-2.7.8
  • python-3.3.2
  • pypy-1.9 (experimental)