docs: Document system dependencies and clarify tool usage#3038
docs: Document system dependencies and clarify tool usage#3038rgant wants to merge 2 commits intotypeddjango:masterfrom
Conversation
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)
|
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. |
|
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: |
|
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 |
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:
mysqlclientto build)django.contrib.gistests)Pre-commit clarification: Added note that pre-commit must be installed separately, with link to installation options and mention of
uvxalternative.uv run pytest: Changed frompytest -n autotouv run pytest -n autofor consistency with uv-based workflow (works regardless of venv activation).Motivation
When setting up the dev environment on macOS,
uv syncfails with a crypticmysqlclientbuild 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.mdpasses