Re: [Django] #36272: [MacOS] geoip aka libgeoip disabled on 2024-12-12

5 views
Skip to first unread message

Django

unread,
Mar 24, 2025, 5:22:26 AM3/24/25
to django-...@googlegroups.com
#36272: [MacOS] geoip aka libgeoip disabled on 2024-12-12
-------------------------------------+-------------------------------------
Reporter: Felipe Villegas | Owner: (none)
Type: Bug | Status: new
Component: GIS | Version: 5.1
Severity: Normal | Resolution:
Keywords: geoip, libgeoip, | Triage Stage: Accepted
geodjango |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36272#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 29, 2025, 6:20:37 AM4/29/25
to django-...@googlegroups.com
#36272: [MacOS] geoip aka libgeoip disabled on 2024-12-12
-------------------------------------+-------------------------------------
Reporter: Felipe Villegas | Owner: (none)
Type: Bug | Status: new
Component: GIS | Version: 5.1
Severity: Normal | Resolution:
Keywords: geoip, libgeoip, | Triage Stage: Accepted
geodjango |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jan Tumpa):

* cc: Jan Tumpa (added)

Comment:

What exactly are we trying to accomplish here, a change in the
documentation or something else?

From my testing, the library can still be normally installed with
MacPorts, so maybe that should be the recommended way?

Additionally, you _can_ install it using HomeBrew by using the --force
flag, but AFAIK that installs it ignoring any exceptions that come up,
which might not be the best thing to recommend.

Finally, perhaps installing from source could be the recommended way?

Even with all that, the repository is archived, so I'm not sure how to
move forward with this issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/36272#comment:3>

Django

unread,
Jan 15, 2026, 6:58:36 PM (3 days ago) Jan 15
to django-...@googlegroups.com
#36272: [MacOS] geoip aka libgeoip disabled on 2024-12-12
-------------------------------------+-------------------------------------
Reporter: Felipe Villegas | Owner: (none)
Type: Bug | Status: new
Component: GIS | Version: 5.1
Severity: Normal | Resolution:
Keywords: geoip, libgeoip, | Triage Stage: Accepted
geodjango |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jon Culver):

Best I can tell, [https://github.com/Homebrew/homebrew-
core/pull/258452/files geoip] (aliased as `libgeoip`) just referred to
[https://github.com/maxmind/geoip-api-c a C extension], which read the
now-deprecated `.dat` database format, but that repo was archived in June
2022, when MaxMind retired the legacy databases. For modern use with
MaxMind's newer `.mmdb` file format, the relevant library is
[https://github.com/maxmind/libmaxminddb libmaxminddb], which
[https://formulae.brew.sh/formula/libmaxminddb can be installed via
Homebrew]. However:

1. It's just an optional performance optimization. The `geoip2` Python
package
[https://github.com/maxmind/GeoIP2-python/blob/main/src/geoip2/database.py#L113-L121
falls back to a pure Python implementation if the C library isn't found];
2. `geoip2`
[https://github.com/maxmind/GeoIP2-python/blob/main/pyproject.toml#L10C6-L10C15
depends on] the Python package `maxminddb`; which, most importantly:
3. `libmaxminddb` is compiled on install of `maxminddb` unless you
intentionally opt out. See [https://github.com/maxmind/MaxMind-DB-Reader-
python/blob/main/setup.py#L21-L58 setup.py].

**TL/DR**: A documentation change looks to be the right call here, just so
folks don't run into that error. Removing `brew install libgeoip` seems
the most pragmatic, since it's already included.

I had to type this out to keep all my thinking in order :) additional
reads or clarifications certainly welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/36272#comment:4>
Reply all
Reply to author
Forward
0 new messages