diff --git a/Changelog.md b/Changelog.md index 38c0b8099..7a79d4946 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Support Aarch64 on OpenBSD in [#570](https://github.com/PyO3/maturin/pull/570) * Support Aarch64 on FreeBSD in [#571](https://github.com/PyO3/maturin/pull/571) * `Cargo.toml`'s `authors` field is now optional per Rust [RFC 3052](https://github.com/rust-lang/rfcs/blob/master/text/3052-optional-authors-field.md) in [#573](https://github.com/PyO3/maturin/pull/573) +* Fix source distribution with local path dependencies on Windows in [#580](https://github.com/PyO3/maturin/pull/580) ## 0.10.6 - 2021-05-21 diff --git a/src/source_distribution.rs b/src/source_distribution.rs index b2b3d8e5d..0d668eac8 100644 --- a/src/source_distribution.rs +++ b/src/source_distribution.rs @@ -170,9 +170,14 @@ pub fn source_distribution( sdist_include: Option<&Vec>, ) -> Result { // Parse ids in the format: - // some_path_dep 0.1.0 (path+file:///home/konsti/maturin/test-crates/some_path_dep) + // on unix: some_path_dep 0.1.0 (path+file:///home/konsti/maturin/test-crates/some_path_dep) + // on windows: some_path_dep 0.1.0 (path+file:///C:/konsti/maturin/test-crates/some_path_dep) // This is not a good way to identify path dependencies, but I don't know a better one - let matcher = Regex::new(r"^(.*) .* \(path\+file://(.*)\)$").unwrap(); + let matcher = if cfg!(windows) { + Regex::new(r"^(.*) .* \(path\+file:///(.*)\)$").unwrap() + } else { + Regex::new(r"^(.*) .* \(path\+file://(.*)\)$").unwrap() + }; let resolve = cargo_metadata .resolve .as_ref()