Skip to content

Commit

Permalink
Fix sdist build for maturin itself
Browse files Browse the repository at this point in the history
```
cargo run sdist
   Compiling maturin v0.13.6 (/Users/messense/Projects/maturin)
    Finished dev [unoptimized + debuginfo] target(s) in 2.28s
     Running `target/debug/maturin sdist`
⚠️  Warning: `build-backend` in pyproject.toml is not set to `maturin`, packaging tools such as pip will not use maturin to build this project.
🍹 Building a mixed python/rust project
🔗 Found bin bindings
📡 Using build options bindings from pyproject.toml
💥 maturin failed
  Caused by: Failed to build source distribution
  Caused by: prefix not found
```
  • Loading branch information
messense committed Oct 14, 2022
1 parent 4cbdccc commit 3ba5bea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/source_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ pub fn source_distribution(
debug!("Ignoring {}", source.display());
continue;
}
let source = fs::canonicalize(source)?;
let target = root_dir.join(source.strip_prefix(&pyproject_dir)?);
if source.is_dir() {
writer.add_directory(target)?;
Expand Down

0 comments on commit 3ba5bea

Please sign in to comment.