Python Build Tools Cheat Sheet

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

The reference material consulted while preparing these pages is listed in the Python Reference bibliography.

A single-page, colour-coded summary of the build automation section, written against pip 26.2.2, Poetry 2.5.1 (poetry-core 2.5.0), build 1.6.1 and twine 7.0.0, and checked on 2026-10-22. It opens with what pip and Poetry share: the five roles (frontend, backend, installer, index, environment), sdists and wheels, the pyproject.toml tables, specifier operators and markers, how Poetry’s ^ and ~ constraints translate to PEP 440, and the lock-file options. A table then maps pip and Poetry side by side (installing a project, adding, removing and upgrading a dependency, locking, installing from the lock, syncing, the dependency tree, building, publishing, indexes, credentials, groups, running in the environment). The pip block lists the install options used most, requirements-file syntax, constraints and build constraints, --group, hash-checking mode, --report and pip lock, configuration files and their precedence with PIP_*, and the error references. The Poetry block lists the commands by task, --with, --without and --only, install versus update versus sync, source priorities, the settings that matter with their POETRY_* form, and plugins. The publishing block has the release checklist, the build, check and upload commands for both chains, a .pypirc skeleton, a Trusted Publishing job, yanking and the wheel-filename anatomy, and a "then → now" strip lists what replaced what — handy for quick memorization or as a downloadable PDF desk reference.

For the full explanation, every option, and additional examples, see the dedicated pages:

pip: Configuration, reproducibility and troubleshooting — Configuration, Authentication, Proxies & Certificates, Repeatable & Secure Installs, pip lock & pylock.toml, and Troubleshooting.

Poetry: Environments, configuration and sources — Managing Environments, Configuration, and Repositories & Package Sources.