Skip to content

Commit

Permalink
add a pp3-none-any tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Oct 15, 2021
1 parent 42e1396 commit 7ac04cc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,7 @@ def sys_tags(*, warn: bool = False) -> Iterator[Tag]:
else:
yield from generic_tags()

yield from compatible_tags()
if interp_name == "pp":
yield from compatible_tags(interpreter="pp3")
else:
yield from compatible_tags()
11 changes: 11 additions & 0 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,3 +1180,14 @@ def manylinux_compatible(tag_major, tag_minor, tag_arch):
"linux_x86_64",
]
assert platforms == expected

def test_pypy_first_tag(self, monkeypatch):
# When building the complete list of pypy tags, make sure the first
# <interpreter>-none-any one is pp3-none-any
monkeypatch.setattr(tags, "interpreter_name", lambda: "pp")

for tag in tags.sys_tags():
if tag.platform == "any":
break

assert tag == tags.Tag("pp3", "none", "any")

0 comments on commit 7ac04cc

Please sign in to comment.