Thanks for the added info. Using fetch instead of pull seems like a better idea indeed. The
branch call was suggested by git after
git pull complained that the current branch didn’t have an upstream. I’ll remove it if I use fetch.
Regarding the explicit -DPYTHON_EXECUTABLE, -DPYTHON_LIBRARY, and -DPYTHON_INCLUDE_DIR, I remember having problems in the past if I didn’t specify all of them, reason why I now always do it like this at least in CI builds, since I don’t have to type it each time anyway. I think the main problem is that even if CMake finds the correct -DPYTHON_EXECUTABLE thanks to
pyenv global, it still sometimes fails to detect the correct -DPYTHON_LIBRARY, because two python installations might actually have the same --prefix. Zen of Python: Explicit is better than implicit