diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 899491a..b223ee4 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -2,7 +2,9 @@ name: build-wheel on: push: - + schedule: + - cron: "5 0 * * 0" + jobs: tag: name: Tag new version @@ -24,7 +26,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: false DEFAULT_BUMP: patch - + wheels: name: Build wheel on ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.arch }} runs-on: ${{ matrix.os }} @@ -81,7 +83,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - if: github.ref == 'refs/heads/master' + if: github.event_name == 'push' && github.ref == 'refs/heads/master' needs: - tag - wheels @@ -102,7 +104,7 @@ jobs: runs-on: ubuntu-latest needs: - release - if: github.ref == 'refs/heads/master' + if: github.event_name == 'push' && github.ref == 'refs/heads/master' environment: name: testpypi url: https://test.pypi.org/p/itis-dakota @@ -125,7 +127,7 @@ jobs: runs-on: ubuntu-latest needs: - test-pypi - if: github.ref == 'refs/heads/master' + if: github.event_name == 'push' && github.ref == 'refs/heads/master' environment: name: pypi url: https://pypi.org/p/itis-dakota diff --git a/Makefile b/Makefile index 0da52e1..8779ad5 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,9 @@ get-dakota-src: git apply ../src_patches/dakota-src.patch && \ git apply ../src_patches/boost.patch && \ git apply ../src_patches/dakenv_restart.patch && \ + git apply ../src_patches/cstdint_dak_types.patch && \ git apply --whitespace=nowarn ../src_patches/adaptsampl_batch.patch && \ find . \( -name \*.cpp -o -name \*.hpp -o -name \*.c -o -name \*.h \) -exec \ sed -i -E -f ../src_patches/replace_old_macros_numpy.sed {} + + cd dakota/packages/external && \ + git apply ../../../src_patches/cstdint.patch diff --git a/itis_dakota/__init__.py b/itis_dakota/__init__.py index b7755b9..dc44cb8 100644 --- a/itis_dakota/__init__.py +++ b/itis_dakota/__init__.py @@ -1,7 +1,2 @@ -from importlib.metadata import PackageNotFoundError, version - -try: - __version__ = version("osparc_filecomms") -except PackageNotFoundError: - # package is not installed - pass +from ._version import __version__ #NOQA +from ._version import __version_tuple__ #NOQA diff --git a/pyproject.toml b/pyproject.toml index 4d67d3e..d9584d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,8 +41,8 @@ repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && ./scripts/fix build-verbosity = 2 [tool.cibuildwheel.environment] -BOOST_LIBRARYDIR = "/usr/lib64/boost169" -BOOST_INCLUDEDIR = "/usr/include/boost169" +BOOST_LIBRARYDIR = "/usr/lib64/boost1.78" +BOOST_INCLUDEDIR = "/usr/include/boost1.78" [tool.cibuildwheel.linux] environment-pass = [ @@ -54,7 +54,7 @@ before-all = [ "yum install -y epel-release yum-utils", "yum-config-manager --enable epel", "yum makecache --refresh", - "yum install -y lapack-devel boost169-devel blas-devel hdf5-devel zip unzip ccache wget", + "yum install -y lapack-devel boost1.78-devel blas-devel hdf5-devel zip unzip ccache wget gsl-devel", "wget --progress=dot:mega https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz", "tar xzvf sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz", "cp sccache-v0.8.1-x86_64-unknown-linux-musl/sccache /usr/bin/", @@ -73,10 +73,12 @@ install_components = ["dakota_for_python"] [tool.py-build-cmake.cmake.options] CMAKE_CXX_COMPILER_LAUNCHER = "sccache" DAKOTA_HAVE_HDF5 = "ON" +HAVE_QUESO = "ON" +DAKOTA_HAVE_GSL = "ON" DAKOTA_PYTHON_WRAPPER = "ON" DAKOTA_PYTHON_DIRECT_INTERFACE = "ON" BUILD_SHARED_LIBS = "OFF" CMAKE_POSITION_INDEPENDENT_CODE = "ON" [tool.pytest.ini_options] -addopts = "--ignore=dakota/" +addopts = "--ignore=dakota/" diff --git a/src_patches/cstdint.patch b/src_patches/cstdint.patch new file mode 100644 index 0000000..c8c462e --- /dev/null +++ b/src_patches/cstdint.patch @@ -0,0 +1,24 @@ +diff --git a/trilinos/packages/teuchos/core/src/Teuchos_BigUInt.hpp b/trilinos/packages/teuchos/core/src/Teuchos_BigUInt.hpp +index 5b6d3c5e..7fbfec7b 100644 +--- a/trilinos/packages/teuchos/core/src/Teuchos_BigUInt.hpp ++++ b/trilinos/packages/teuchos/core/src/Teuchos_BigUInt.hpp +@@ -43,6 +43,7 @@ + #define TEUCHOS_BIG_UINT_HPP + + #include ++#include + #include + + /*! \file Teuchos_BigUInt.hpp +diff --git a/trilinos/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp b/trilinos/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp +index e82e8be9..a51f66cf 100644 +--- a/trilinos/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp ++++ b/trilinos/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp +@@ -42,6 +42,7 @@ + #ifndef TEUCHOS_BIG_UINT_DECL_HPP + #define TEUCHOS_BIG_UINT_DECL_HPP + ++#include + #include + + /*! \file Teuchos_BigUIntDecl.hpp diff --git a/src_patches/cstdint_dak_types.patch b/src_patches/cstdint_dak_types.patch new file mode 100644 index 0000000..66af001 --- /dev/null +++ b/src_patches/cstdint_dak_types.patch @@ -0,0 +1,12 @@ +diff --git a/src/dakota_data_types.hpp b/src/dakota_data_types.hpp +index 8771587..a430d51 100644 +--- a/src/dakota_data_types.hpp ++++ b/src/dakota_data_types.hpp +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + namespace Dakota { + diff --git a/src_patches/find_python.patch b/src_patches/find_python.patch new file mode 100644 index 0000000..414eae8 --- /dev/null +++ b/src_patches/find_python.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/DakotaFindPython.cmake b/cmake/DakotaFindPython.cmake +index 9ffa1ca..8edd853 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_LEGACY) + if (DAKOTA_PYTHON_DIRECT_INTERFACE) +@@ -31,7 +31,7 @@ macro(dakota_find_python) + + endif() + +- find_package(Python REQUIRED ${dakota_python_components}) ++ # find_package(Python REQUIRED ${dakota_python_components}) + + if (DAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY) + message(STATUS "NumPy version ${Python_NumPy_VERSION} found at ${Python_NumPy_INCLUDE_DIRS}")