This fixes a number of issues in the free-threaded build on Windows.
Before, we were linking libpython313.dll but we really wanted libpython313t.dll. This is the correct thing to do on all platforms so I also updated the build config to always look for a dynamic library with the t suffix. This may matter for packaging on Linux distros, depending on how they decide to package the free-threaded build.
It also updates the logic to get sysconfig data from the interpreter at build time on Windows. Before, we always ignored the sysconfigdata because it was never populated, but as of 3.13 this has been fixed, so I only return a blank sysconfig on Python < 3.13.
I also had to account for the fact that Python.h doesn't do #define Py_GIL_DISABLED on windows for the ffi check.
Fixes #4685.
This fixes a number of issues in the free-threaded build on Windows.
Before, we were linking
libpython313.dll
but we really wantedlibpython313t.dll
. This is the correct thing to do on all platforms so I also updated the build config to always look for a dynamic library with thet
suffix. This may matter for packaging on Linux distros, depending on how they decide to package the free-threaded build.It also updates the logic to get sysconfig data from the interpreter at build time on Windows. Before, we always ignored the sysconfigdata because it was never populated, but as of 3.13 this has been fixed, so I only return a blank sysconfig on Python < 3.13.
I also had to account for the fact that
Python.h
doesn't do#define Py_GIL_DISABLED
on windows for the ffi check.