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

Fix version filec #21

Merged
merged 8 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: build-wheel

on:
push:

schedule:
- cron: "5 0 * * 0"

jobs:
tag:
name: Tag new version
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 2 additions & 7 deletions itis_dakota/__init__.py
Original file line number Diff line number Diff line change
@@ -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
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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/",
Expand All @@ -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/"
24 changes: 24 additions & 0 deletions src_patches/cstdint.patch
Original file line number Diff line number Diff line change
@@ -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 <iostream>
+#include <cstdint>
#include <Teuchos_BigUIntDecl.hpp>

/*! \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 <cstdint>
#include <iosfwd>

/*! \file Teuchos_BigUIntDecl.hpp
12 changes: 12 additions & 0 deletions src_patches/cstdint_dak_types.patch
Original file line number Diff line number Diff line change
@@ -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 <list>
#include <map>
#include <set>
+#include <cstdint>

namespace Dakota {

22 changes: 22 additions & 0 deletions src_patches/find_python.patch
Original file line number Diff line number Diff line change
@@ -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}")
Loading