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 6414d09 commit 6f56e49Copy full SHA for 6f56e49
src/rust/cryptography-cffi/build.rs
@@ -78,8 +78,15 @@ fn main() {
78
build.include(python_include);
79
}
80
81
- // Enable abi3 mode if we're not using PyPy.
82
- if python_impl != "PyPy" {
+ let is_free_threaded = run_python_script(
+ &python,
83
+ "import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')), end='')",
84
+ )
85
+ .unwrap()
86
+ == "True";
87
+
88
+ // Enable abi3 mode if we're not using PyPy or the free-threaded build
89
+ if !(python_impl == "PyPy" || is_free_threaded) {
90
// cp37 (Python 3.7 to help our grep when we some day drop 3.7 support)
91
build.define("Py_LIMITED_API", "0x030700f0");
92
0 commit comments