Skip to content

Commit

Permalink
Merge pull request #520 from messense/upload-ignore-desc-diff
Browse files Browse the repository at this point in the history
Ignore Description metadata difference in upload command
  • Loading branch information
messense authored May 1, 2021
2 parents ecfa5ca + d89ee1d commit 278f9de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,14 @@ fn run() -> Result<()> {

// All uploaded files are expected to share the build context
// and to have identical package metadata as a result.
if !metadata.iter().all(|x| *x == metadata[0]) {
let first_metadata = &metadata[0];
let is_same_package = metadata.iter().all(|x| {
x.iter().zip(first_metadata).all(|(next, first)| {
// Ignore Description field difference
next == first || (next.0 == first.0 && next.0 == "Description")
})
});
if !is_same_package {
bail!(
"Attempting to upload wheel and/or source distribution files \
that belong to different python packages."
Expand Down

0 comments on commit 278f9de

Please sign in to comment.