From 15f3ea3dc28a6459c3964b7430aa76a77ba3f236 Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 28 Apr 2021 20:36:00 +0800 Subject: [PATCH] Ignore Description metadata difference in upload command --- src/main.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9aaa454ad..259be60ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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."