Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/unit/forklift/test_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,13 @@ def test_upload_fails_without_permission(self, pyramid_config, db_request):
"manylinux2014_ppc64",
"manylinux2014_ppc64le",
"manylinux2014_s390x",
"manylinux_2_5_i686",
"manylinux_2_12_x86_64",
"manylinux_2_17_aarch64",
"manylinux_2_17_armv7l",
"manylinux_2_17_ppc64",
"manylinux_2_17_ppc64le",
"manylinux_3_0_s390x",
"macosx_10_6_intel",
"macosx_10_13_x86_64",
# A real tag used by e.g. some numpy wheels
Expand Down
14 changes: 14 additions & 0 deletions warehouse/forklift/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ def namespace_stdlib_list(module_list):
"fat64",
"universal",
}
# manylinux pep600 is a little more complicated:
_manylinux_platform_re = re.compile(r"manylinux_(\d+)+_(\d+)+_(?P<arch>.*)")
_manylinux_arches = {
"x86_64",
"i686",
"aarch64",
"armv7l",
"ppc64",
"ppc64le",
"s390x",
}


# Actual checking code;
Expand All @@ -146,6 +157,9 @@ def _valid_platform_tag(platform_tag):
m = _macosx_platform_re.match(platform_tag)
if m and m.group("arch") in _macosx_arches:
return True
m = _manylinux_platform_re.match(platform_tag)
if m and m.group("arch") in _manylinux_arches:
return True
return False


Expand Down