Building with build
Create wheels and sdists.
What Building Means
Your source code must be turned into distribution artifacts that pip can install. The modern tool for this is build, run as python -m build.
It produces two kinds of files: a source distribution and a wheel.
sdist vs wheel
Two artifact types:
- sdist (.tar.gz) a source archive; pip builds it on install
- wheel (.whl) a pre-built archive; pip just unpacks it
Wheels install faster and are preferred. The sdist is the fallback and the canonical source.