Description
Bug Description
Hello!
When analyzing the source distribution of my Rust/Python package, named differt-core
, I noticed that the content of .tar.gz
was as follows:
> tree -L dist/differt_core-0.0.30/
dist/differt_core-0.0.30/
├── Cargo.lock
├── Cargo.toml
├── differt-core # <-- I want to exclude this, as this is duplicate (and undesired) contents
│ ├── benches
│ ├── Cargo.toml
│ ├── LICENSE.md
│ ├── python
│ ├── README.md
│ ├── src
│ └── tests
├── LICENSE.md
├── PKG-INFO
├── pyproject.toml
├── python
│ └── differt_core
├── README.md
└── src
├── geometry
├── lib.rs
├── rt
└── scene
As you can see, the python
folder (with Python source files) is included both ./
and ./differt-core
, and I don't know how to exclude this (because this is not needed to build from source): I tried various exclude patterns, without success.
I have looked at other projects, and found that py-polars
had the same "issue" in that its source distribution also contains the project folder itself.
However, projects like uv
do not have this issue.
The main observed difference between uv
and my project (as well as py-polars
) is that uv
is defined in the root directory, whereas my project (and py-polars
) are defined in a subdirectory.
Do you have any idea how to fix this?
Thanks in advance for your help!
Relevant links:
- My project (
differt-core
subdirectory): https://github.com/jeertmans/DiffeRT/tree/v0.0.30/differt-core (and PyPI release files) py-polars
: https://github.com/pola-rs/polars/tree/py-1.17.1/py-polars (and PyPI release files)uv
: https://github.com/astral-sh/uv/tree/0.5.8 (and PyPI release files)
Your maturin version (maturin --version
)
1.7.8
Your Python version (python -V
)
N/A
Your pip version (pip -V
)
N/A
What bindings you're using
pyo3
Does cargo build
work?
- Yes, it works
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /
)?
- Yes
Steps to Reproduce
You can either download the source distribution from the above links, or build from source with either:
maturin sdist --out dist --manifest-path differt-core/Cargo.toml
or with uv:
uv build --package differt-core --sdist -o dist
Next, open the archive.