Using the Makefile

Using the Makefile#

make.bat on Windows, or Makefile on *nix, is often a handy companion in development. It makes development less dry, repetitive and error-prone, and the process as a whole more smooth-sailing. It can also pull in non-Python dependencies when needed and leaves behind automatically ignored marker files removable by a simple cleanup command. Tasks are effectively automated using the make <target> syntax.

The Makefile is intended to be used by developers, not end users, and it obviously requires GNU Make.

If you are in PowerShell, make will not work directly and you must input .\make instead. You are strongly advised to develop in cmd.exe.

Target-specific dependencies#

Besides some executables from Python dependencies that will be on PATH once make setup has been run and the environment is activated, the following executables will be automatically installed on your system if not present. This implicit installation process requires internet access, as well as cURL or GNU wget on *nix (dependency-free on Windows):

Requires uv:

  • audit

  • lint (Also requires ruff and ty)

  • lock

  • setup (Also pulls in ruff and ty)

Requires prek:

  • pc

  • setup

Requires cURL 7.66.0+ on Unix (for parallel downloads):

  • docs

All targets#

Below is the Makefile help as of $v:

Available targets:
 audit     - Run a security audit on all optional dependencies using uv
 badges    - Run the test suite twice, exiting on any failure; generate static badges on success
 bug       - File a bug report in the browser
 clean     - Clean development artifacts and caches, including __pycache__/, build/, dist/, generated files, and coverage results
 clean-all - Equivalent to git clean -dxf
 docs      - Build a preview of the documentation in docs/build/html, exiting with a non-zero status on any warning; requires internet access
 help      - Show this help message; the default target
 lint      - Run ruff and ty sequentially; likely the most useful target
 lock      - Regenerate the project lockfile at uv.lock, updating dependencies
 log       - Generate a compact changelog from Git history and print it in the terminal with colour
 pc        - Run prek hooks on all files, unlike the run before each commit which only runs on modified files
 release   - Make a release interactively; requires the GitHub CLI (gh)
 setup     - Create a virtual environment, install the package in editable mode with development dependencies inside and install prek hooks
 test      - Run tests, allowing up to AUTILSTESTMAXFAIL failures (default 3) since any more would likely mean an obvious error
Targets may be added on popular demand.

Note

Preview generated by scripts/generate.sh at 2026-09-06 14:24:58 UTC. DO NOT COMMIT.