Skip to content

Commit 7337e80

Browse files
committed
Allow manylinux_x_y wheel upload (PEP600)
manylinux_x_y platform tag is official per PEP600 see also pypa/manylinux#542
1 parent ce55af7 commit 7337e80

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/unit/forklift/test_legacy.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,13 @@ def test_upload_fails_without_permission(self, pyramid_config, db_request):
22942294
"manylinux2014_ppc64",
22952295
"manylinux2014_ppc64le",
22962296
"manylinux2014_s390x",
2297+
"manylinux_2_5_i686",
2298+
"manylinux_2_12_x86_64",
2299+
"manylinux_2_17_aarch64",
2300+
"manylinux_2_17_armv7l",
2301+
"manylinux_2_17_ppc64",
2302+
"manylinux_2_17_ppc64le",
2303+
"manylinux_3_0_s390x",
22972304
"macosx_10_6_intel",
22982305
"macosx_10_13_x86_64",
22992306
# A real tag used by e.g. some numpy wheels

warehouse/forklift/legacy.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,17 @@ def namespace_stdlib_list(module_list):
127127
"fat64",
128128
"universal",
129129
}
130+
# manylinux pep600 is a little more complicated:
131+
_manylinux_platform_re = re.compile(r"manylinux_(\d+)+_(\d+)+_(?P<arch>.*)")
132+
_manylinux_arches = {
133+
"x86_64",
134+
"i686",
135+
"aarch64",
136+
"armv7l",
137+
"ppc64",
138+
"ppc64le",
139+
"s390x",
140+
}
130141

131142

132143
# Actual checking code;
@@ -136,6 +147,9 @@ def _valid_platform_tag(platform_tag):
136147
m = _macosx_platform_re.match(platform_tag)
137148
if m and m.group("arch") in _macosx_arches:
138149
return True
150+
m = _manylinux_platform_re.match(platform_tag)
151+
if m and m.group("arch") in _manylinux_arches:
152+
return True
139153
return False
140154

141155

0 commit comments

Comments
 (0)