4

I'm trying to use GeoIP with Django. It requires the MaxMind GeoIP C API.

If I were using Ruby, I could simply use the 'geoip' gem which bundles the C API and the Ruby bindings, as explained in Installing MaxMind GeoIP ruby library on heroku.

Unfortunately, nothing like this exists for Python, so I'm wondering how I would go about installing the C API from source on Heroku, or if there's the equivalent of a package manager on Heroku (ie. 'brew install geoip' for OS X, and 'sudo apt-get install geoip' for Ubuntu).

Community
  • 1
  • 1
jpulgarin
  • 103
  • 5

1 Answers1

4

You will need to write your own buildpack to compile anything in Heroku, at the time you push code and in your requirements.txt there's a package with a binary requirement. See the python buildpack code to guide your work https://github.com/heroku/heroku-buildpack-python

Guillermo Siliceo Trueba
  • 4,251
  • 5
  • 34
  • 47