pybind11/tools
Wenzel Jakob 409be8336f CMake: react to python version changes
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.
2021-09-24 17:42:06 +02:00
..
check-style.sh Add shellcheck style checking (#3114) 2021-07-14 16:52:13 -04:00
cmake_uninstall.cmake.in format: include .in files 2020-08-06 11:54:41 -04:00
FindCatch.cmake feat: new FindPython support (#2370) 2020-08-19 12:26:26 -04:00
FindEigen3.cmake style: avoid using unintialized variables (#2806) 2021-01-19 18:48:22 -05:00
FindPythonLibsNew.cmake style: avoid using unintialized variables (#2806) 2021-01-19 18:48:22 -05:00
libsize.py maint(precommit): Apply isort (#3195) 2021-08-13 12:37:05 -04:00
make_changelog.py maint(precommit): Apply isort (#3195) 2021-08-13 12:37:05 -04:00
pybind11Common.cmake fix: Mingw64 corrected and add a CI job to test it (#3132) 2021-07-30 13:48:41 -04:00
pybind11Config.cmake.in Improved workaround for Centos 8 failure (follow-on to PR #3030). (#3193) 2021-08-12 13:21:49 -07:00
pybind11NewTools.cmake CMake: react to python version changes 2021-09-24 17:42:06 +02:00
pybind11Tools.cmake fix(build): avoid a possible warning about shadowed variables and changing behaviors (#3220) 2021-09-23 15:42:16 -04:00
pyproject.toml ci: releases (#2530) 2020-09-30 15:48:08 -04:00
setup_global.py.in Splitting out pybind11/stl/filesystem.h. (#3077) 2021-07-08 09:02:48 -07:00
setup_main.py.in feat(package): support pipx run (#3117) 2021-07-15 15:01:29 -04:00