-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated source distribution does not handle aliased dependencies correctly #1781
Comments
Thanks for the report, can you try matruin main branch to see whether #1741 has fixed it already? |
Using
|
For your repro, if you remove |
In polars the equivalent of py-adder was not part of the workspace, however while minimizing the example i realized that this is not required to trigger the behaviour. Here is the commit where i moved py-adder into the workspace 0xbe7a/maturin-dependeny-rename-mre@bcd5b48 When i remove Would you mind releasing the new |
I'll probably release a new version next week. |
Bug Description
maturin sdist
does not handle "aliased" dependencies of workspaces correctly:I have a package
py_adder
which is the only member of a workspace (Link to a repository containing the full minimal reproducible example is at the end).The workspaces
Cargo.toml
looks like this:adder_backend
is just a minimal library containing a single functionadd
.adder_backend
sCargo.toml
looks like this:My package
py-adder
uses this backend like this:When running
maturin build
ormaturin develop
inside thepy-adder
folder everything works as expected and the functions can be used by python.We can also build the source distribution by running
maturin sdist
inside thepy-adder
folder.However, when trying to run
maturin build
inside the extracted source distribution folder we get:Which is expected, as the
Cargo.toml
inside folderlocal_dependencies/backend
declares a package calledadder_backend
and we are looking forbackend
.We recently hit this bug in polars pola-rs/polars#11371.
I compiled a repository containing a minimal reproducible example: https://github.com/0xbe7a/maturin-dependeny-rename-mre
Your maturin version (
maturin --version
)maturin 1.2.3
Your Python version (
python -V
)Python 3.11.5
Your pip version (
pip -V
)pip 23.2.1
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
cd py-adder
maturin develop
and observe that everything works as expectedmaturin sdist
maturin build
inside the new folder containing the extracted sourceThe text was updated successfully, but these errors were encountered: