diff --git a/Makefile b/Makefile index fb61565..b013de1 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ get-dakota-src: git submodule update --init packages/pecos && \ git submodule update --init packages/surfpack && \ git apply ../src_patches/dakota-src.patch && \ + git apply ../src_patches/boost.patch && \ git apply ../src_patches/dakenv_restart.patch && \ git apply --whitespace=nowarn ../src_patches/adaptsampl_batch.patch && \ find . \( -name \*.cpp -o -name \*.hpp -o -name \*.c -o -name \*.h \) -exec \ diff --git a/pyproject.toml b/pyproject.toml index b5e56fe..dd3256a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,10 +18,12 @@ issues = "https://github.com/ITISFoundation/itis-dakota/issues" [build-system] requires = [ "py-build-cmake", + "cmake", "auditwheel", "setuptools", "setuptools_scm", - "numpy" + "numpy", + "h5py" ] build-backend = "build_backend.build" backend-path = "." @@ -38,6 +40,10 @@ local_scheme = "no-local-version" repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && ./scripts/fix_wheel.sh {dest_dir}" build-verbosity = 2 +[tool.cibuildwheel.environment] +BOOST_LIBRARYDIR = "/usr/lib64/boost169" +BOOST_INCLUDEDIR = "/usr/include/boost169" + [tool.cibuildwheel.linux] environment-pass = [ "SCCACHE_GHA_ENABLED", @@ -71,5 +77,3 @@ DAKOTA_PYTHON_WRAPPER = "ON" DAKOTA_PYTHON_DIRECT_INTERFACE = "ON" BUILD_SHARED_LIBS = "OFF" CMAKE_POSITION_INDEPENDENT_CODE = "ON" -BOOST_LIBRARYDIR = "/usr/lib64/boost169" -BOOST_INCLUDEDIR = "/usr/include/boost169" diff --git a/src_patches/boost.patch b/src_patches/boost.patch new file mode 100644 index 0000000..7b39c76 --- /dev/null +++ b/src_patches/boost.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bd008bc..fd0adca 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -877,7 +877,7 @@ list(APPEND EXPORT_TARGETS dakota_src_fortran) + add_library(dakota_src ${Dakota_src}) + # When using Boost imported targets, we only link libraries using them, + # then rely on transitive library linking from CMake +-target_link_libraries(dakota_src dakota_src_fortran ${DAKOTA_BOOST_TARGETS}) ++target_link_libraries(dakota_src dakota_src_fortran ${Boost_LIBRARIES}) + # Dakota should always depend on util (consider removing option in DakotaOptions.cmamke + target_link_libraries(dakota_src dakota_util) + list(APPEND EXPORT_TARGETS dakota_util) +@@ -1052,7 +1052,7 @@ set(Dakota_LIBRARIES ${DAKOTA_LIBS} ${DAKOTA_PKG_LIBS} ${DAKOTA_EXTPROJ_LIBS} + + # Libraries that will be on the system + # We add Boost libraries by path/name here for Makefile.export purposes +-set(Dakota_TPL_LIBRARIES ${EXT_TPL_LIBS} ${Boost_LIBRARIES} ++set(Dakota_TPL_LIBRARIES ${EXT_TPL_LIBS} + CACHE INTERNAL "Dakota TPL libraries") + + message(STATUS "Dakota_LIBRARIES: ${Dakota_LIBRARIES}")