From b0348de83bfc7c86a890bccdf46dd2067b1b458d Mon Sep 17 00:00:00 2001 From: "Denis Bilenko (aider)" Date: Tue, 4 Mar 2025 17:47:10 +0100 Subject: [PATCH] fix: Correctly parse wheel filename version without build tag --- libs/patchwheel/parse.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/libs/patchwheel/parse.go b/libs/patchwheel/parse.go index 140b6bdfa..2967c41c3 100644 --- a/libs/patchwheel/parse.go +++ b/libs/patchwheel/parse.go @@ -48,18 +48,11 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) { tags := parts[tagStartIdx:] tags[2] = strings.TrimSuffix(tags[2], ".whl") - // The version is the second part - version := parts[1] - - // If there are build tags, they are between the version and the python tag - // Include them in the version - if tagStartIdx > 2 { - buildTags := parts[2:tagStartIdx] - version = version + "-" + strings.Join(buildTags, "-") - } - // The distribution is always the first part distribution := parts[0] + + // The version is the second part - don't include build tags + version := parts[1] return &WheelInfo{ Distribution: distribution,