Skip to content
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

Failiure when building a wheel from a rust crate with a local dependency #507

Open
IBims1NicerTobi opened this issue Feb 23, 2025 · 2 comments

Comments

@IBims1NicerTobi
Copy link

I have a rust crate in a workspace with a local dependency. Basically I have

project_workspace_dir
├─project-core
└─project-python

And my project_python depends on project_core in Cargo.toml like this:

[dependencies]
project-core = { path = "../project-core" }

When I call python -m build -s I see the following in my logs:

creating project-0.1.0/../project-core
creating project-0.1.0/../project-core/src

and

copying ../project-core/Cargo.toml -> tr0-0.1.0/../project-core
copying ../project-core/src/error.rs -> tr0-0.1.0/../project-core/src
copying ../project-core/src/lib.rs -> tr0-0.1.0/../project-core/src

This leads to project-core ending up next to dist

@IBims1NicerTobi
Copy link
Author

I think the optimal solution here would be to detect local dependencies, actually copy them to the archive and rewrite Cargo.toml for the affected crate, but I'm not sure how reasonable that is.

@IBims1NicerTobi
Copy link
Author

MWE here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant