mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
409be8336f
The new FindPython-based variant of the CMake scripts caches information about the chosen Python version that can become stale. For example, suppose I configure a simple pybind11-based project as follows ``` cmake -S . -B build -GNinja -DPython_ROOT=<path to python 3.8> ``` which will generate `my_extension.cpython-38-x86_64-linux-gnu.so`. A subsequent change to the python version like ``` cmake -S . -B build -GNinja -DPython_ROOT=<path to python 3.9> ``` does not update all necessary build system information. In particular, the compiled file is still called `my_extension.cpython-38-x86_64-linux-gnu.so`. This commit fixes the problem by detecting changes in `Python_EXECUTABLE` and re-running Python as needed. Note that the previous way of detecting Python does not seem to be affected, it always specifies the right suffix. |
||
---|---|---|
.. | ||
check-style.sh | ||
cmake_uninstall.cmake.in | ||
FindCatch.cmake | ||
FindEigen3.cmake | ||
FindPythonLibsNew.cmake | ||
libsize.py | ||
make_changelog.py | ||
pybind11Common.cmake | ||
pybind11Config.cmake.in | ||
pybind11NewTools.cmake | ||
pybind11Tools.cmake | ||
pyproject.toml | ||
setup_global.py.in | ||
setup_main.py.in |