Skip to content

docs: Document system dependencies and clarify tool usage#3038

Open
rgant wants to merge 2 commits intotypeddjango:masterfrom
rgant:docs/system-dependencies
Open

docs: Document system dependencies and clarify tool usage#3038
rgant wants to merge 2 commits intotypeddjango:masterfrom
rgant:docs/system-dependencies

Conversation

@rgant
Copy link
Contributor

@rgant rgant commented Feb 4, 2026

Summary

Documents system dependencies required to run the test suite, which are currently undocumented and can cause confusing build failures for new contributors.

Changes

  • New "System Dependencies" section covering:

    • MySQL/MariaDB client libraries (required for mysqlclient to build)
    • GDAL and GEOS (optional, for django.contrib.gis tests)
    • Platform-specific instructions for Ubuntu/Debian, Fedora/RHEL, and macOS (Homebrew)
    • Note about macOS library path issues and workaround for GIS tests
  • Pre-commit clarification: Added note that pre-commit must be installed separately, with link to installation options and mention of uvx alternative.

  • uv run pytest: Changed from pytest -n auto to uv run pytest -n auto for consistency with uv-based workflow (works regardless of venv activation).

Motivation

When setting up the dev environment on macOS, uv sync fails with a cryptic mysqlclient build error unless you have MariaDB/MySQL client libraries installed. Similarly, 2 GIS tests fail without GDAL/GEOS.
These dependencies aren't mentioned anywhere in the docs.

This PR documents what I learned while setting up the project for the first time.

Test plan

  • pre-commit run --files CONTRIBUTING.md passes
  • Verified instructions work on macOS with Homebrew

Add a System Dependencies section documenting:
- MySQL/MariaDB client libraries (required for mysqlclient)
- GDAL and GEOS (optional, for django.contrib.gis tests)
- Platform-specific instructions for Ubuntu/Debian, Fedora/RHEL, and macOS

Also clarify:
- Pre-commit installation requirement with link to options
- Use `uv run pytest` for running tests (works regardless of venv activation)
@rgant
Copy link
Contributor Author

rgant commented Feb 4, 2026

I'm working on a real PR, but first I wanted to get this setup. So I documented my process as a fresh contributor to ensure the documentation is robust.

I normally format markdown files, but that will introduce a lot of noise so I didn't include it. If you are interested I would be happy to contribute a dprint setup to format markdown files for the project automatically.

@ngnpope
Copy link
Member

ngnpope commented Feb 5, 2026

Can we not just point to the documentation already in Django to ensure that we stay in sync?

Another helpful hint as far as Debian/Ubuntu packages is this list:

@rgant
Copy link
Contributor Author

rgant commented Feb 6, 2026

Thanks for the feedback! I've updated the section to link to external docs for the install details:

I kept the macOS GDAL/GEOS symlink workaround since that isn't covered in any upstream docs and is a real stumbling block for MacOS contributors. I also kept a brief note explaining that these dependencies are
required here even though Django treats them as optional — a contributor coming from Django might not expect to need them. I did not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants