Skip to content

Commit b99d254

Browse files
committed
Skip incompatible tags in macos
1 parent ca4db62 commit b99d254

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
@@ -127,11 +127,19 @@ def _any_compat_tag() -> _Tag:
127127
the same system where it was produced.
128128
Therefore we can just be pragmatic and pick one of the compatible tags.
129129
"""
130-
tag = next(sys_tags())
130+
tag = next(_skip_incompatible_tags())
131+
# ^-- TODO: replace with `tag = next(sys_tags())` (pypa/python#11789)
131132
components = (tag.interpreter, tag.abi, tag.platform)
132133
return cast(_Tag, tuple(map(_normalization.filename_component, components)))
133134

134135

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

0 commit comments

Comments
 (0)