Skip to content

Source distribution builder


A source distribution, or sdist, is an archive of Python "source code". Although largely unspecified, by convention it should include everything that is required to build a wheel without making network requests.

Configuration

The builder plugin name is sdist.

[tool.hatch.build.targets.sdist]
[build.targets.sdist]

Options

Option Default Description
core-metadata-version "2.4" The version of core metadata to use
strict-naming true Whether or not file names should contain the normalized version of the project name
support-legacy false Whether or not to include a setup.py file to support legacy installation mechanisms

Versions

Version Description
standard (default) The latest conventional format

Default file selection

When the user has not set any file selection options, all files that are not ignored by your VCS will be included.

Note

The following files are always included and cannot be excluded:

  • /pyproject.toml
  • /hatch.toml
  • /hatch_build.py
  • /.gitignore or /.hgignore
  • Any defined readme file
  • All defined license-files

Reproducibility

Reproducible builds are supported.

Build data

This is data that can be modified by build hooks.

Data Default Description
dependencies Extra project dependencies