Skip to content

Commit 8815e29

Browse files
mayeutdi
andauthored
Allow manylinux_x_y wheel upload (PEP600) (#7853)
manylinux_x_y platform tag is official per PEP600 see also pypa/manylinux#542 Co-authored-by: Dustin Ingram <[email protected]>
1 parent 4c53180 commit 8815e29

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/unit/forklift/test_legacy.py

+7
Original file line numberDiff line numberDiff line change
@@ -2514,6 +2514,13 @@ def test_upload_fails_without_permission(self, pyramid_config, db_request):
25142514
"manylinux2014_ppc64",
25152515
"manylinux2014_ppc64le",
25162516
"manylinux2014_s390x",
2517+
"manylinux_2_5_i686",
2518+
"manylinux_2_12_x86_64",
2519+
"manylinux_2_17_aarch64",
2520+
"manylinux_2_17_armv7l",
2521+
"manylinux_2_17_ppc64",
2522+
"manylinux_2_17_ppc64le",
2523+
"manylinux_3_0_s390x",
25172524
"macosx_10_6_intel",
25182525
"macosx_10_13_x86_64",
25192526
# A real tag used by e.g. some numpy wheels

warehouse/forklift/legacy.py

+14
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ def namespace_stdlib_list(module_list):
137137
"fat64",
138138
"universal",
139139
}
140+
# manylinux pep600 is a little more complicated:
141+
_manylinux_platform_re = re.compile(r"manylinux_(\d+)+_(\d+)+_(?P<arch>.*)")
142+
_manylinux_arches = {
143+
"x86_64",
144+
"i686",
145+
"aarch64",
146+
"armv7l",
147+
"ppc64",
148+
"ppc64le",
149+
"s390x",
150+
}
140151

141152

142153
# Actual checking code;
@@ -146,6 +157,9 @@ def _valid_platform_tag(platform_tag):
146157
m = _macosx_platform_re.match(platform_tag)
147158
if m and m.group("arch") in _macosx_arches:
148159
return True
160+
m = _manylinux_platform_re.match(platform_tag)
161+
if m and m.group("arch") in _manylinux_arches:
162+
return True
149163
return False
150164

151165

0 commit comments

Comments
 (0)