Bug Description
I have this workspace definition in my root Cargo.toml file:
[workspace]
members = [
".",
"test-client",
]
The python package with pyo3 bindings is the crate in the root . directory, and the test-client is a separate binary.
When building an sdist, maturin keeps this workspace table unmodified, but does not include the test-client directory in the sdist, which actually breaks building the crate from sdist sources (because cargo can't find the test-client directory if it's not there), see decathorpe/mitmproxy_wireguard#18 for a bug report I got.
The complete Cargo.toml of the affected project is here:
https://github.com/decathorpe/mitmproxy_wireguard/blob/main/Cargo.toml
cargo publish handles this case by dropping the [workspace] table from Cargo.toml for crates that are uploaded on crates.io, but I'm not sure if that simple solution is going to work for maturin (as I think it does support building projects that are split across many workspace components).
Is there a way to tell maturin to include the directories which are mentioned in the [workspace] definition even though they're not used to build the actual Python wheel? That would let me work around the problem.
Your Python version (python -V)
Python 3.11.0
Your pip version (pip -V)
pip 22.3
What bindings you're using
pyo3
Does cargo build work?
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
Steps to Reproduce
- use a Cargo.toml that has both
[package] + [workspace] tables
- run
maturin sdist
- the tarball doesn't all the sources necessary to build the crate
Bug Description
I have this workspace definition in my root
Cargo.tomlfile:The python package with pyo3 bindings is the crate in the root
.directory, and thetest-clientis a separate binary.When building an sdist, maturin keeps this workspace table unmodified, but does not include the
test-clientdirectory in the sdist, which actually breaks building the crate from sdist sources (because cargo can't find thetest-clientdirectory if it's not there), see decathorpe/mitmproxy_wireguard#18 for a bug report I got.The complete Cargo.toml of the affected project is here:
https://github.com/decathorpe/mitmproxy_wireguard/blob/main/Cargo.toml
cargo publishhandles this case by dropping the[workspace]table from Cargo.toml for crates that are uploaded on crates.io, but I'm not sure if that simple solution is going to work for maturin (as I think it does support building projects that are split across many workspace components).Is there a way to tell maturin to include the directories which are mentioned in the
[workspace]definition even though they're not used to build the actual Python wheel? That would let me work around the problem.Your Python version (
python -V)Python 3.11.0
Your pip version (
pip -V)pip 22.3
What bindings you're using
pyo3
Does
cargo buildwork?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/)?Steps to Reproduce
[package]+[workspace]tablesmaturin sdist