Skip to content

Commit 75dd66d

Browse files
committed
Skip incompatible tags in macos
1 parent 642d3c4 commit 75dd66d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

setuptools/command/editable_wheel.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,19 @@ def _any_compat_tag() -> _Tag:
128128
the same system where it was produced.
129129
Therefore we can just be pragmatic and pick one of the compatible tags.
130130
"""
131-
tag = next(sys_tags())
131+
tag = next(_skip_incompatible_tags())
132+
# ^-- TODO: replace with `tag = next(sys_tags())` (pypa/python#11789)
132133
components = (tag.interpreter, tag.abi, tag.platform)
133134
return cast(_Tag, tuple(map(_normalization.filename_component, components)))
134135

135136

137+
def _skip_incompatible_tags():
138+
# Temporary workaround for https://github.com/pypa/pip/issues/11789
139+
for tag in sys_tags():
140+
if all(plat not in tag.platform for plat in ("macosx_12", "macosx_11")):
141+
yield tag
142+
143+
136144
class editable_wheel(Command):
137145
"""Build 'editable' wheel for development.
138146
This command is private and reserved for internal use of setuptools,

0 commit comments

Comments
 (0)