From a017b9898c611eac08d973585f03420f9aa948e3 Mon Sep 17 00:00:00 2001 From: messense Date: Sun, 18 Sep 2022 18:06:30 +0800 Subject: [PATCH] Fix duplicated `Cargo.toml` of local dependencies in sdist --- Changelog.md | 1 + src/source_distribution.rs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 88771b8a6..94a5d320b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fix `Cargo.toml` in new project template in [#1109](https://github.com/PyO3/maturin/pull/1109) * Fix `maturin develop` on Windows when using Python installed from msys2 in [#1112](https://github.com/PyO3/maturin/pull/1112) +* Fix duplicated `Cargo.toml` of local dependencies in sdist in [#1114](https://github.com/PyO3/maturin/pull/1114) ## [0.13.3] - 2022-09-15 diff --git a/src/source_distribution.rs b/src/source_distribution.rs index 962000290..9bcc54e91 100644 --- a/src/source_distribution.rs +++ b/src/source_distribution.rs @@ -179,9 +179,7 @@ fn add_crate_to_source_distribution( .filter(|(target, source)| { // Skip generated files. See https://github.com/rust-lang/cargo/issues/7938#issuecomment-593280660 // and https://github.com/PyO3/maturin/issues/449 - if target == Path::new("Cargo.toml.orig") - || (root_crate && target.file_name() == Some("Cargo.toml".as_ref())) - { + if target == Path::new("Cargo.toml.orig") || target == Path::new("Cargo.toml") { false } else { source.exists()