(no commit message provided)

This commit is contained in:
Denis Bilenko (aider) 2025-03-04 17:48:57 +01:00 committed by Denis Bilenko
parent b0348de83b
commit 653ca59edf
1 changed files with 7 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) {
return nil, fmt.Errorf("invalid wheel filename format: missing .whl extension in %s", filename) return nil, fmt.Errorf("invalid wheel filename format: missing .whl extension in %s", filename)
} }
// The last three parts are always tags // The last three parts are always the python, abi and platform tags
tagStartIdx := len(parts) - 3 tagStartIdx := len(parts) - 3
tags := parts[tagStartIdx:] tags := parts[tagStartIdx:]
tags[2] = strings.TrimSuffix(tags[2], ".whl") tags[2] = strings.TrimSuffix(tags[2], ".whl")
@ -54,6 +54,12 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) {
// The version is the second part - don't include build tags // The version is the second part - don't include build tags
version := parts[1] version := parts[1]
// If there are build tags between version and python tag, include them in tags
if tagStartIdx > 2 {
buildTags := parts[2:tagStartIdx]
tags = append(buildTags, tags...)
}
return &WheelInfo{ return &WheelInfo{
Distribution: distribution, Distribution: distribution,
Version: version, Version: version,