Fix Windows wheel build for free-threaded Python (#219)
Initial plan
Fix Windows wheel build: use PYBIND11_FINDPYTHON instead of deprecated PYBIND11_NEWPYTHON
The free-threaded CPython 3.14 (cp314t) build on Windows fails with: LINK : fatal error LNK1104: cannot open file ‘python314.lib’
The root cause is that PYBIND11_NEWPYTHON is deprecated/unrecognized in pybind11 3.0.x, causing it to fall back to FindPythonLibsNew.cmake which doesn’t properly handle the ‘t’ suffix for free-threaded Python on Windows.
PYBIND11_FINDPYTHON is the correct variable that tells pybind11 to use CMake’s modern FindPython module, which correctly handles free-threaded Python library naming (python314t.lib vs python314.lib).
Co-authored-by: dfm 350282+dfm@users.noreply.github.com
Co-authored-by: copilot-swe-agent[bot] 198982749+Copilot@users.noreply.github.com Co-authored-by: dfm 350282+dfm@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号