-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 11 and 12 support #2441
base: master
Are you sure you want to change the base?
Python 11 and 12 support #2441
Conversation
It is not sufficient to modify your |
Unfortunately, it does not seem to be the case the cmake respects pyenv. E.g., I have this:
Nevertheless, cmake uses Python 3.12.7:
The same occurs if I run cmake manually in the src-gen directory, so this is not an lfc problem. So, empirical evidence shows that cmake does NOT respect pyenv. Note that I'm running the latest cmake:
The older version of cmake before updating to this version exhibits the same behavior. lfc generates the following line in the CMakeLists.txt file:
My plan is to modify lfc to constrain find_package to exactly the version the path, which should then work with pyenv. |
Did you have a look at the hints for ind_python? |
Thanks for the pointer to HINTS! I tried the following, but it still fails to find the version of Python specified by
|
This PR makes Python versions 3.11 and 3.12 work with the Python target.
There is a problem I need help with, however. In this PR, the Python version is hardwired to 3.12.7 in the PythonGenerator.java file, which generates the CMake directives, and has this line:
The problem is that if this line allows 3.10.0 up to 3.13.0, which is what we want, then lfc inevitably picks a different Python from one identified by CMake, and you get an error message like:
How can we force CMake to pick the Python version that is in the PATH? Sadly, it does not do that.
This supersedes #1902, which I will close.