|
12 | 12 |
|
13 | 13 | from .._compat import tomllib |
14 | 14 | from .._logging import logger |
| 15 | +from ..builder.sysconfig import get_abi_flags |
15 | 16 | from ..cmake import CMake |
16 | 17 | from ..errors import CMakeNotFoundError |
17 | 18 | from ..resources import resources |
@@ -76,6 +77,7 @@ def override_match( |
76 | 77 | failed: bool | None = None, |
77 | 78 | system_cmake: str | None = None, |
78 | 79 | cmake_wheel: bool | None = None, |
| 80 | + abi_flags: str | None = None, |
79 | 81 | ) -> tuple[dict[str, str], set[str]]: |
80 | 82 | """ |
81 | 83 | Check if the current environment matches the overrides. Returns a dict |
@@ -191,6 +193,14 @@ def override_match( |
191 | 193 | else: |
192 | 194 | failed_set.add("cmake-wheel") |
193 | 195 |
|
| 196 | + if abi_flags is not None: |
| 197 | + current_abi_flags = get_abi_flags() |
| 198 | + match_msg = regex_match(current_abi_flags, abi_flags) |
| 199 | + if match_msg: |
| 200 | + passed_dict["abi-flags"] = match_msg |
| 201 | + else: |
| 202 | + failed_set.add("abi-flags") |
| 203 | + |
194 | 204 | if env: |
195 | 205 | for key, value in env.items(): |
196 | 206 | if key not in current_env: |
|
0 commit comments