Skip to content
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

Updated modules in find_package command for Python3 #933

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NicoleJurjew
Copy link

No description provided.

@KrisThielemans KrisThielemans linked an issue Oct 3, 2024 that may be closed by this pull request
@KrisThielemans KrisThielemans self-assigned this Oct 3, 2024
@KrisThielemans
Copy link
Member

https://cmake.org/cmake/help/latest/module/FindPythonInterp.html deprecated since 3.12, while we require 3.16.2.

Current change is minimal. We probably should pass Python_EXECUTABLE as opposed to PYTHON_EXECUTABLE to dependencies, but this needs a check which ones we use. Probably easiest to pass both. I think we should no longer attempt to pass include and other paths, and let CMake sort it out.

SuperBuild.cmake Outdated Show resolved Hide resolved
SuperBuild.cmake Outdated Show resolved Hide resolved
@KrisThielemans
Copy link
Member

Need to update how we look for cython I guess

[100%] Generating build/timestamp
Traceback (most recent call last):
  File "/home/runner/work/SIRF-SuperBuild/SIRF-SuperBuild/build/builds/TomoPhantom/build/Wrappers/Python/setup.py", line 19, in <module>
    from Cython.Distutils import build_ext
ModuleNotFoundError: No module named 'Cython'
gmake[5]: *** [Wrappers/Python/CMakeFiles/PythonWrapper.dir/build.make:76: Wrappers/Python/build/timestamp] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:157: Wrappers/Python/CMakeFiles/PythonWrapper.dir/all] Error 2
gmake[3]: *** [Makefile:136: all] Error 2
gmake[2]: *** [CMakeFiles/TomoPhantom.dir/build.make:86: builds/TomoPhantom/stamp/TomoPhantom-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:755: CMakeFiles/TomoPhantom.dir/all] Error 2

This error is different from why I saw in #932 but it's possible that @NicoleJurjew only saw the Tomophantom error when using this branch I guess.

@NicoleJurjew
Copy link
Author

With the suggested changes, the PYTHONPATH isn't exported correctly.

I think some changes need to be done here, as well:
https://github.com/SyneRBI/SIRF-SuperBuild/blob/5f1a7f498bf6f41551c19eb53798b5d33af43eec/SuperBuild.cmake#L366C1-L386C8

@KrisThielemans
Copy link
Member

that's a bit strange. What is the content of env_sirf.sh etc then? Can you just do a

message(STATUS "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")

before those statement to check what it is?

@NicoleJurjew
Copy link
Author

This is the content of env_sirf.sh:
grafik

Where will that message be written to then? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to switch to use CMake's FindPython
2 participants