Skip to content

Commit c84867f

Browse files
committed
Made wheel file name parsing more permissive
Fixes #265.
1 parent 826dff4 commit c84867f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/news.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Release Notes
44
**UNRELEASED**
55

66
- Fixed build number appearing in the ``.dist-info`` directory name
7+
- Made wheel file name parsing more permissive
78

89
**0.32.1**
910

wheel/wheelfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# Non-greedy matching of an optional build number may be too clever (more
1515
# invalid wheel filenames will match). Separate regex for .dist-info?
1616
WHEEL_INFO_RE = re.compile(
17-
r"""^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))(-(?P<build>\d.*?))?
18-
-(?P<pyver>[a-z].+?)-(?P<abi>.+?)-(?P<plat>.+?)(\.whl|\.dist-info)$""",
17+
r"""^(?P<namever>(?P<name>[\w\d.]+)-(?P<ver>[\w\d.]+))(-(?P<build>\d[\w\d.]*))?
18+
-(?P<pyver>[\w\d.]+)-(?P<abi>[\w\d.]+)-(?P<plat>[\w\d.]+)\.whl$""",
1919
re.VERBOSE)
2020

2121

0 commit comments

Comments
 (0)