Skip to content

Find python dep#1521

Merged
cyrush merged 6 commits intollnl:task/2026_03_py_cmake_refactor_integration_branchfrom
mathstuf:find-python-dep
Mar 6, 2026
Merged

Find python dep#1521
cyrush merged 6 commits intollnl:task/2026_03_py_cmake_refactor_integration_branchfrom
mathstuf:find-python-dep

Conversation

@mathstuf
Copy link
Contributor

@mathstuf mathstuf commented Feb 6, 2026

No description provided.

@mathstuf
Copy link
Contributor Author

mathstuf commented Feb 6, 2026

I'll note that I ran into issues with the Limited API and MPI enabled at the same time; I suspect that's a hole in testing coverage (if it is cared about).

@cyrush
Copy link
Member

cyrush commented Feb 10, 2026

Thank you for working on this, it will be nice to move on from the old logic.

A few questions:

The compiled modules still land inside of the folder structure setup by the main python module (conduit_python_build). What allows us to skip the that dependency now?

Can we set PYTHON_FOUND as the indicator that things are ok instead of using ENABLE_PYTHON.

I strive to use ZZZ_FOUND for all tpls uniformly.

@mathstuf
Copy link
Contributor Author

Then let's use Python3_FOUND?

@cyrush
Copy link
Member

cyrush commented Feb 10, 2026

That sounds good, thanks!

@cyrush
Copy link
Member

cyrush commented Feb 11, 2026

It looks like detection / finding numpy is failing on windows + msvc:

CMake Error at C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Python3 (missing: Python3_NumPy_INCLUDE_DIRS NumPy) (found
  version "3.14.2")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.31/Modules/FindPython/Support.cmake:4002 (find_package_handle_standard_args)
  C:/Program Files/CMake/share/cmake-3.31/Modules/FindPython3.cmake:602 (include)
  cmake/Setup3rdParty.cmake:95 (find_package)
  CMakeLists.txt:92 (include)

The other failures are due to the spack builds using to old of a cmake.

I have a spack update PR that should resolve those.

CMP0074 is `NEW` as of 3.12, so the minimum of 3.21 already sets it to
`NEW`.
Also switch to using `Python3_FOUND` as the configure exits if this is
set and Python is not found.
Everything is handled by the FindPython3 APIs now.
This lets users request `find_package(Conduit COMPONENT Python)` to
ensure that Python is available.
@cyrush
Copy link
Member

cyrush commented Mar 2, 2026

Thank you for working on this, it will be nice to move on from the old logic.

A few questions:

The compiled modules still land inside of the folder structure setup by the main python module (conduit_python_build). What allows us to skip the that dependency now?

Can we set PYTHON_FOUND as the indicator that things are ok instead of using ENABLE_PYTHON.

I strive to use ZZZ_FOUND for all tpls uniformly.

I understand the conduit_python_build change now, I mistook this for the pure module python setup, but it's the build step used to pass the limited api defs.

This week I will recreate the CI env and see if I can get more details about why NumPy is not found.

@cyrush
Copy link
Member

cyrush commented Mar 6, 2026

@mathstuf The CI issue are due to PYTHON_EXECUTABLE, not Python3_EXECUTABLE being set -- also we need to change the targets used to include/link numpy.

I am going to merge this into an integration branch and then make some changes to get this sorted.

I'll create a new PR into develop from that branch, and we can discuss further evolution there.

@cyrush cyrush changed the base branch from develop to task/2026_03_py_cmake_refactor_integration_branch March 6, 2026 18:54
@cyrush cyrush merged commit dc75042 into llnl:task/2026_03_py_cmake_refactor_integration_branch Mar 6, 2026
15 of 25 checks passed
@mathstuf mathstuf deleted the find-python-dep branch March 6, 2026 20:50
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.

2 participants