Support freethreading python (#2805)

freethreaded python reintroduces abiflags since it is incompatible with
regular native modules and abi3.

Tests: None yet! We're lacking cpython 3.13 no-gil builds we can use in
ci.

My test setup:

```
PYTHON_CONFIGURE_OPTS="--enable-shared --disable-gil" pyenv install 3.13.0a5
cargo run -q -- venv -q -p python3.13 .venv3.13 --no-cache-dir && cargo run -q -- pip install -v psutil --no-cache-dir && .venv3.13/bin/python -c "import psutil"
```

Fixes #2429
This commit is contained in:
konsti 2024-04-12 11:39:47 +02:00 committed by GitHub
parent 98fd9d7d14
commit 7f70849e3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 68 additions and 32 deletions

View file

@ -534,6 +534,9 @@ def main() -> None:
"scheme": get_scheme(),
"virtualenv": get_virtualenv(),
"platform": get_operating_system_and_architecture(),
# The `t` abiflag for freethreading python
# https://peps.python.org/pep-0703/#build-configuration-changes
"gil_disabled": bool(sysconfig.get_config_var("Py_GIL_DISABLED")),
}
print(json.dumps(interpreter_info))