Skip to content

Commit

Permalink
Patch dakota source to remove embedded python
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit committed Dec 27, 2023
1 parent 1818591 commit 2c9f373
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ get-dakota-src:
cd dakota && \
git submodule update --init packages/external && \
git submodule update --init packages/pecos && \
git submodule update --init packages/surfpack
git submodule update --init packages/surfpack && \
git apply ../dakota-src.patch
21 changes: 21 additions & 0 deletions dakota-src.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/cmake/DakotaFindPython.cmake b/cmake/DakotaFindPython.cmake
index 43f9fb9..f4c4e28 100644
--- a/cmake/DakotaFindPython.cmake
+++ b/cmake/DakotaFindPython.cmake
@@ -8,7 +8,7 @@ macro(dakota_find_python)
if(DAKOTA_PYTHON_DIRECT_INTERFACE OR DAKOTA_PYTHON_SURROGATES OR
DAKOTA_PYTHON_WRAPPER OR DAKOTA_PYBIND11)
message(STATUS "Dakota enabling Python (Development) for direct or surrogate interface")
- list(APPEND dakota_python_components Development)
+ list(APPEND dakota_python_components Development.Module)

if (DAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY)
message(STATUS "Dakota enabling Python direct interface with NumPy")
@@ -18,6 +18,7 @@ macro(dakota_find_python)
endif()

find_package(Python REQUIRED ${dakota_python_components})
+ # find_package(Python COMPONENTS ${dakota_python_components} REQUIRED)

# pybind11, C3, Acro, etc., use older CMake FindPythonInterp, so we
# coerce it to use same as Dakota; more complex situations may

0 comments on commit 2c9f373

Please sign in to comment.