Skip to content

Instantly share code, notes, and snippets.

@JasonSanford
Created December 20, 2012 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JasonSanford/4347827 to your computer and use it in GitHub Desktop.
Save JasonSanford/4347827 to your computer and use it in GitHub Desktop.

A custom buildpack is used to include the GEOS binaries necessary for Shapely. To force deployment to use a custom buildpack, add the following heroku config.

heroku config:set BUILDPACK_URL=git://github.com/JasonSanford/heroku-buildpack-python-geos.git

I think this buildpack will download/unpack the GEOS binaries each time you deploy which is not ideal. We should probably conditionally download these in the future.

Additionally, the LIBRARY_PATH must be updated so that Shapely can locate the necessary binaries.

heroku config:set LIBRARY_PATH=/app/.heroku/vendor/lib:vendor/geos/geos/lib
heroku config:set LD_LIBRARY_PATH=/app/.heroku/vendor/lib:vendor/geos/geos/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment