Modernizing Your Python Package with pyproject and hatch
summary
Shows migrating a legacy setup.py to pyproject.toml using Hatch’s new --init command, then creating isolated Hatch environments with per-environment dependencies (pytest, sphinx, coverage) and per-env scripts. Demonstrates using hatch run and a matrix to test across multiple Python versions (citing PEPs 517, 518, 621, 631, 660), building sdist and wheel artifacts, and uploading them to Test PyPI — a live demo that produces distribution files and completes the end-to-end workflow.
AI-written summary · about
chapters (12)
- 0:00Welcome
- 1:03Python packaging today
- 3:08Packaging challenges
- 6:15PEP history
- 9:23Hatch intro
- 12:53Virtual envs with Hatch
- 15:19Setup.py to pyproject.toml
- 21:52pyproject.toml scripts
- 24:38Python version matrix
- 26:27Build and test demo
- 28:23Distribute and publish
- 29:05Q&A
related talks
28mHatch: The only tool you need
43mHatch: The Python Package Manager You Haven't Tried Yet
39mMoving to pyproject and tox
23mPackaging Python in 2021
36mPython Packaging from Init to Deploy
28mModern Python packaging without pain
45mStarting your project right: setup and automation for all
26mOpen Source on Easy Mode
