Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.64 KB

File metadata and controls

42 lines (30 loc) · 1.64 KB

hatch multi

Create multiple discrete packages from optional-dependencies (extras)

Build Status codecov License PyPI

Overview

A small hatch plugin to create multiple discrete packages from a single package, via optional-dependencies.

pyproject.toml

[project]
name = "my-project"
...
dynamic = ["dependencies"]

[project.optional-dependencies]
main = [...]
other = [...]

[tool.hatch.metadata.hooks.hatch-multi]
primary = "main"

# Required for split sdists to retain their package name when installed.
[tool.hatch.build.targets.sdist.hooks.hatch-multi]
python -m build
# Produces my-project wheel and sdist, with dependencies from [project.optional-dependencies.main]

HATCH_MULTI_BUILD=other python -m build
# Produces my-project-other wheel and sdist, with dependencies from [project.optional-dependencies.other]

Note

This library was generated using copier from the Base Python Project Template repository.