File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/scikit_build_core/builder Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,18 @@ def get_abi_flags() -> str:
193193 Return the ABI flags for the current Python interpreter. Derived from
194194 ``packaging.tags.sys_tags()`` since that works on Windows.
195195 """
196-
197- most_compatible = next (iter (packaging .tags .sys_tags ()))
198- full_abi = most_compatible .abi
199- vers = packaging .tags .interpreter_version ()
200- abi_flags = full_abi [full_abi .find (vers ) + len (vers ) :]
201- return "" .join (sorted (abi_flags ))
196+ abi_flags : str | None = sysconfig .get_config_var ("ABIFLAGS" )
197+ if abi_flags :
198+ return abi_flags
199+
200+ if sys .implementation .name == "cpython" and sys .platform .startswith ("win32" ):
201+ most_compatible = next (iter (packaging .tags .sys_tags ()))
202+ full_abi = most_compatible .abi
203+ vers = packaging .tags .interpreter_version ()
204+ abi_flags = full_abi [full_abi .find (vers ) + len (vers ) :]
205+ return "" .join (sorted (abi_flags ))
206+
207+ return ""
202208
203209
204210def info_print (
You can’t perform that action at this time.
0 commit comments