Skip to content

Commit

Permalink
Ignore Description metadata difference in upload command
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Apr 28, 2021
1 parent cd0b0ae commit 15f3ea3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,21 @@ 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];
if !metadata.iter().all(|x| {
x.iter().zip(first_metadata).all(
|((next_name, next_value), (first_name, first_value))| {
if next_name == first_name && next_value == first_value {
true
} else if next_name == first_name && next_name == "Description" {
// Ignore description difference
true
} else {
false
}
},
)
}) {
bail!(
"Attempting to upload wheel and/or source distribution files \
that belong to different python packages."
Expand Down

0 comments on commit 15f3ea3

Please sign in to comment.