0Pricing
Python Academy · Lesson

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.

All lessons in this course

  1. Project Structure and pyproject.toml
  2. Building with build
  3. Versioning and Metadata
  4. Publishing with twine
← Back to Python Academy