Skip to content

Commit

Permalink
Allow manylinux_x_y wheel upload (PEP600) (#7853)
Browse files Browse the repository at this point in the history
manylinux_x_y platform tag is official per PEP600

see also pypa/manylinux#542

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
  • Loading branch information
mayeut and di authored Aug 13, 2020
1 parent 4c53180 commit 8815e29
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
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

0 comments on commit 8815e29

Please sign in to comment.