Skip to content

Commit

Permalink
Try to fix windows test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 1, 2023
1 parent 4c178a3 commit 5cb7b0d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ lddtree = "0.3.3"
cc = "1.0.72"
dunce = "1.0.2"
normpath = "1.0.0"
path-slash = "0.2.1"
pep440_rs = { version = "0.3.6", features = ["serde"] }
pep508_rs = { version = "0.2.1", features = ["serde"] }
time = "0.3.17"
Expand Down
11 changes: 10 additions & 1 deletion src/source_distribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use cargo_metadata::{Metadata, MetadataCommand};
use fs_err as fs;
use ignore::overrides::Override;
use normpath::PathExt as _;
use path_slash::PathExt as _;
use std::collections::HashMap;
use std::path::{Path, PathBuf};
use std::process::Command;
Expand Down Expand Up @@ -455,8 +456,16 @@ fn add_cargo_package_files_to_sdist(
let relative_workspace_cargo_toml = relative_cargo_lock.with_file_name("Cargo.toml");
let mut deps_to_keep = known_path_deps.clone();
// Also need to the main Python binding crate
let workspace_root_slash = PathBuf::from(
workspace_root
.to_path_buf()
.into_std_path_buf()
.to_slash()
.unwrap()
.as_ref(),
);
let main_member_name = abs_manifest_dir
.strip_prefix(workspace_root)
.strip_prefix(workspace_root_slash)
.unwrap()
.to_str()
.unwrap()
Expand Down

0 comments on commit 5cb7b0d

Please sign in to comment.