Summary
In a monorepo/workspace layout, when building sdist from a Python binding subdirectory, tool.maturin.include cannot reference files in parent directories because .. is rejected.
This makes it hard to include required root-level files like LICENSE and rust-toolchain.toml without duplicating them into each binding package directory.
Current behavior
include entries containing .. are rejected (include/exclude pattern must not contain '..').
- For a project like:
repo/
LICENSE
rust-toolchain.toml
crates/
ast/
pyproject.toml
lsp-py/
pyproject.toml
we cannot express:
[tool.maturin]
include = [
{ path = "../../LICENSE", format = "sdist" },
{ path = "../../rust-toolchain.toml", format = "sdist" },
]
So users have to:
- duplicate these files in each binding crate, or
- add custom copy/sync scripts in CI/build.
Expected behavior
Please provide a supported way for subproject pyproject.toml to include selected workspace-root files into sdist, without file duplication.
Why this matters
- Common Rust+Python monorepo pattern (multiple bindings in
crates/*-py).
- Duplicated legal/toolchain files are easy to drift.
- Symlink-based workarounds are fragile, especially on Windows developer environments.
Related issues
Summary
In a monorepo/workspace layout, when building sdist from a Python binding subdirectory,
tool.maturin.includecannot reference files in parent directories because..is rejected.This makes it hard to include required root-level files like
LICENSEandrust-toolchain.tomlwithout duplicating them into each binding package directory.Current behavior
includeentries containing..are rejected (include/exclude pattern must not contain '..').we cannot express:
So users have to:
Expected behavior
Please provide a supported way for subproject
pyproject.tomlto include selected workspace-root files into sdist, without file duplication.Why this matters
crates/*-py).Related issues
maturin sdistdoesn't include LICENSE on root when the root is not current directory #2531 (root LICENSE handling / PEP 639 context)