Closed badshah400 closed 1 month ago
Ah, thanks, that solves some Python mysteries (or PYTHON mysteries, or PyThOn mysteries)... The above is sufficient, I'll merge it in.
I have pushed these changes (along with a few others related to PYTHON
-> Python
) to the devel branch, can you give that a shot and let me know if anything is still not right?
Hi, Sorry for the delay. I have been testing commit 15bb0214dd790ccdfe42c36f9cc4d76b2e5c52aa but there seems to be an issue still and cmake errors out at the configure stage:
[ 31s] -- Found Python: /usr/bin/python3.11 (found version "3.11.9") found components: Interpreter Development Development.Module Development.Embed
[ 31s] -- Performing Test HAS_FLTO
[ 31s] -- Performing Test HAS_FLTO - Success
[ 31s] -- Found pybind11: /usr/include (found version "2.12.0")
[ 31s] -- Found python
[ 31s] -- Python version is ..
[ 31s] -- Installing Python modules in
[ 31s] -- Python abi name
[ 31s] CMake Error at CMakeLists.txt:348 (string):
[ 31s] string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
[ 31s] command.
[ 31s]
[ 31s]
[ 31s] -- Python module extension .so
This is with Python 3.11.
@badshah400 That last error seems to combine the devel branch with your patch in https://github.com/kpeeters/cadabra2/issues/310. In any case, the fact that nothing is displayed in the 'Found python' is weird. This should display the python library; on my machine this line reads
-- Found python /usr/lib/aarch64-linux-gnu/libpython3.10.so
This string and other Python-related variables seem to be all empty for you, which is why that string REGEX REPLACE fails.
Just so we are on the same page, can you check the current devel branch once more and let me know if you still get that error above? This works for me with CMake 3.30.2.
I think this is now all correct, and 2.5.6 introduces some other simplifications to the Python logic which means that the cadabra2 executables do no longer have hardcoded absolute paths in them. I will close this for now, but please re-open if you still think there is a problem.
Awesome, thanks. Sorry, I have not had enough time to test recent commits but shall try the new release this week and let you know if I run into any issues.
Cadabra version 2.5.4.
CMake's
FindPython
sets the variablePython_EXECUTABLE
¹ but allCMakeLists.txt
files in the cadabra source code refer toPYTHON_EXECUTABLE
(wrong case). The latter seems to no longer work at all with cmake version 3.30,which is what openSUSE/Tumbleweed has, leading to lots ofpython not found
related errors during build and, in case one gets around that by settingPYTHON_SITE_PATH
explicitly during configure, when running ctest.I ended up patching as follows to get the build to succeed. Please let me know if this is the correct thing to do and, if it is, whether you would like me to send a PR. Thanks in advance.
¹ https://cmake.org/cmake/help/latest/module/FindPython.html