We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb7f3d3 commit 695fb1dCopy full SHA for 695fb1d
setuptools/command/bdist_wheel.py
@@ -291,10 +291,16 @@ def _validate_py_limited_api(self) -> None:
291
raise ValueError(f"py-limited-api must match '{PY_LIMITED_API_PATTERN}'")
292
293
if sysconfig.get_config_var("Py_GIL_DISABLED"):
294
+ # sys.abiflags is only defined on POSIX
295
+ abiflags = getattr(sys, "abiflags", "")
296
+ if abiflags:
297
+ abinote = "(sys.abiflags={}). "
298
+ else:
299
+ abinote = ". "
300
raise ValueError(
301
f"`py_limited_api={self.py_limited_api!r}` not supported. "
302
"`Py_LIMITED_API` is currently incompatible with "
- f"`Py_GIL_DISABLED` ({sys.abiflags=!r}). "
303
+ f"`Py_GIL_DISABLED`{abinote}"
304
"See https://github.com/python/cpython/issues/111506."
305
)
306
0 commit comments