PyO3 / PyO3/setuptools-rust

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

Open
#507 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
680
Forks
110
Avg merge
3d 18h
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the workspace layout and local Cargo.toml dependency shown in the report, using python -m build -s. Start by tracing how the source distribution handles files from ../project-core; done means building the distribution no longer places project-core outside the expected project or dist contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.