Skip to content

Instantly share code, notes, and snippets.

@Jonty
Created February 6, 2017 14:26
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 Jonty/7d4857a0f0104fe3fef39bfd2911bb59 to your computer and use it in GitHub Desktop.
Save Jonty/7d4857a0f0104fe3fef39bfd2911bb59 to your computer and use it in GitHub Desktop.
Workaround to install geo deps on cloudfoundry. Place in `bin/pre_compile` in the root of the app.
#!/bin/bash
VENDORED_GDAL="https://lang-python.s3.amazonaws.com/cedar-14/libraries/vendor/gdal.tar.gz"
VENDORED_GEOS="https://lang-python.s3.amazonaws.com/cedar-14/libraries/vendor/geos.tar.gz"
VENDORED_PROJ="https://lang-python.s3.amazonaws.com/cedar-14/libraries/vendor/proj.tar.gz"
mkdir -p .heroku/vendor
echo "Grabbing gdal..."
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor
echo "Grabbing geos..."
curl $VENDORED_GEOS -s | tar zxv -C .heroku/vendor
echo "Grabbing proj..."
curl $VENDORED_PROJ -s | tar zxv -C .heroku/vendor
echo "Installed all vendored geo dependencies!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment