Skip to main content

A minimal PEP 517 build backend for creating meta-packages

Project description

rind

A minimal PEP 517 build backend for creating meta-packages — packages that contain no code, only dependencies.

Why?

Sometimes you want to split a package into:

  • mypackage-core: The actual code with minimal dependencies
  • mypackage: A meta-package that installs mypackage-core plus recommended optional dependencies

This lets users choose between a lightweight install (pip install mypackage-core) or batteries-included (pip install mypackage), while both provide the same import mypackage experience.

Features

  • Zero Python code in output: Wheels contain only .dist-info/ metadata
  • Automatic version pinning: mypackage==1.2.3 always installs mypackage-core==1.2.3
  • Metadata inheritance: Reuse authors, license, URLs from the core package's pyproject.toml
  • Selective extras: Choose which extras to pass through vs. make required
  • Single repository: Both packages live in the same repo, tagged together

Quick Start

Create a meta/ directory in your repository with this pyproject.toml:

[build-system]
requires = ["rind"]
build-backend = "rind"

[tool.rind]
# Inherit metadata from the core package
inherit-metadata = "../pyproject.toml"

# The meta-package name (the core package keeps the original name)
name = "mypackage"

# Extras from core to include as default dependencies
core-extras = ["recommended", "optional"]

# Extras to pass through (not included by default, but available)
passthrough-extras = ["test", "docs"]

Build both packages:

python -m build .        # Build mypackage-core
python -m build meta/    # Build mypackage (meta-package)

Configuration Reference

All options go in [tool.rind]:

Option Required Description
name Yes Name of the meta-package
inherit-metadata No Path to parent pyproject.toml to inherit from
description No Override inherited description
core-package No Core package name (default: inherited name or {name}-core)
core-extras No List of extras to include as required dependencies
passthrough-extras No List of extras to re-expose (with pinned versions)
additional-dependencies No Extra dependencies beyond the core package
version-root No Root for setuptools_scm (default: "..")

How Version Pinning Works

Both packages use setuptools_scm to get their version from git tags. When you tag a release:

git tag v1.2.3
python -m build .        # Creates mypackage_core-1.2.3-py3-none-any.whl
python -m build meta/    # Creates mypackage-1.2.3-py3-none-any.whl
                         # with Requires-Dist: mypackage-core==1.2.3

Since both builds use the same git state, versions always match.

Example: reproject

The reproject package uses this backend:

Root pyproject.toml (reproject-core):

[project]
name = "reproject-core"
dependencies = ["numpy", "astrofrog", "scipy"]  # minimal

[project.optional-dependencies]
dask = ["dask", "zarr"]
hips = ["pillow", "pyavm"]
test = ["pytest"]

meta/pyproject.toml (reproject):

[build-system]
requires = ["rind"]
build-backend = "rind"

[tool.rind]
inherit-metadata = "../pyproject.toml"
name = "reproject"
core-extras = ["dask", "hips"]        # Now required
passthrough-extras = ["test"]          # Still optional

Result:

  • pip install reproject-core → minimal dependencies
  • pip install reproject-core[dask] → adds dask support
  • pip install reproject → full experience (core + dask + hips)
  • pip install reproject[test] → full experience + test dependencies

License

BSD 3-Clause License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rind-0.1.0a1.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rind-0.1.0a1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file rind-0.1.0a1.tar.gz.

File metadata

  • Download URL: rind-0.1.0a1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for rind-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 89e2c3a63c3e86d6eb137171f6b17e32227f6b353008a9c00e4f379c9cfad413
MD5 d8b8ff9e8f2d22968648f9fba7a7f96c
BLAKE2b-256 7a14df0b2e602d2d2be90c362277456689ab7bf599abeaa76d0db44cce8638a9

See more details on using hashes here.

File details

Details for the file rind-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: rind-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for rind-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 17db2296b09165517f5f1ce0c9292064844dfc0501b0bed93562aaf40cf8e537
MD5 7112fc3f05c126185988eb181334387e
BLAKE2b-256 b591b439614057b02dc75f8fe4ab28aac3c4d0d5bb89ccacb3c60269d2206f92

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page