Skip to content

Commit

Permalink
Skip incompatible tags in macos
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Aug 23, 2023
1 parent f1ae9d2 commit 5ceb4b3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setuptools/command/editable_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,19 @@ def _any_compat_tag() -> _Tag:
the same system where it was produced.
Therefore we can just be pragmatic and pick one of the compatible tags.
"""
tag = next(sys_tags())
tag = next(_skip_incompatible_tags())
# ^-- TODO: replace with `tag = next(sys_tags())` (pypa/python#11789)
components = (tag.interpreter, tag.abi, tag.platform)
return cast(_Tag, tuple(map(_normalization.filename_component, components)))


def _skip_incompatible_tags():
# Temporary workaround for https://github.com/pypa/pip/issues/11789
for tag in sys_tags():
if all(plat not in tag.platform for plat in ("macosx_12", "macosx_11")):
yield tag


class editable_wheel(Command):
"""Build 'editable' wheel for development.
This command is private and reserved for internal use of setuptools,
Expand Down

0 comments on commit 5ceb4b3

Please sign in to comment.