Skip to content

Commit

Permalink
Merge pull request #3 from ITISFoundation/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
wvangeit authored Dec 27, 2023
2 parents adb1148 + 39870b6 commit 54a48c9
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 14 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-20.04]
python: [cp38]
python: [cp38,cp39,cp310]
arch: [x86_64]

steps:
Expand All @@ -28,9 +28,37 @@ jobs:
- uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}*${{ matrix.arch }}
#CIBW_BEFORE_ALL: "yum install -y gcc-gfortran lapack-devel boost169-devel boost169-filesystem boost169-program-options boost169-regex boost169-serialization blas-devel"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.arch }}
path: wheelhouse/*.whl

pypi:
name: Publish wheels on PyPI
runs-on: ubuntu-latest
needs: [wheels]
if: github.ref == 'refs/heads/master'
environment:
name: pypi
url: https://pypi.org/p/itis-dakota
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Put artifacts into dist directory
run: |
mkdir -p dist
find artifacts -type f \( -iname \*.whl -o -iname \*.tar.gz \) -exec mv {} dist \;
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
10 changes: 7 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ or redistributing the Work and assume any risks associated
with Your exercise of permissions under this License.

The external Dakota source code used to build the wheels
is distributed under the GNU Lesser General Public License,
and the third-party packages and libraries it uses have
compatible licenses.
is distributed under the GNU Lesser General Public License
(http://www.gnu.org/licenses/lgpl.html).
The original Dakota source code can be downloaded from:
https://github.com/snl-dakota/dakota
The third-party packages and libraries Dakota uses have
compatible licenses.
See the Dakota README for more details.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ all:


wheel: cache-clean clean
CIBW_BUILD=cp38*x86_64 CIBW_BUILD_VERBOSITY=10 CIBW_SKIP="*musllinux*" cibuildwheel --platform linux
CIBW_BUILD=cp38*x86_64 cibuildwheel --platform linux

install:
pip install -v .
Expand Down
Empty file added README.md
Empty file.
25 changes: 17 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
[project]
name = "itis_dakota"
version = "0.0.3"
version = "0.0.5"
description = "Dakota wheel built by the IT'IS Foundation, Zurich, Switzerland"
dependencies = []
license = { file = "LICENSE.txt" }
readme = {file = "README.md", content-type = "text/markdown"}
dependencies = ["numpy"]
requires-python = ">=3.8"

[project.urls]
homepage = "https://github.com/ITISFoundation/itis-dakota"
repository = "https://github.com/ITISFoundation/itis-dakota.git"
issues = "https://github.com/ITISFoundation/itis-dakota/issues"

[build-system]
requires = ["py-build-cmake", "numpy"]
build-backend = "py_build_cmake.build"

[tool.setuptools]
license-files = ["LICENSE.txt"]

[tool.cibuildwheel]
before-build = ["pip install auditwheel --upgrade", "pip install numpy", "pip install cmake --upgrade"]
#before-build = ["pip install auditwheel --upgrade", "pushd /opt/_internal && tar -xJf static-libs-for-embedding-only.tar.xz && popd", "pip install numpy", "pip install cmake --upgrade"]
before-all = ["yum install -y lapack-static boost169-static blas-static python3-devel.x86_64"]
before-build = ["pip install auditwheel --upgrade", "pip install cmake --upgrade"]
before-all = ["yum install -y lapack-devel boost169-devel blas-devel zip unzip"]

repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && ./scripts/fix_wheel.sh {dest_dir}"
build-verbosity = 2
Expand All @@ -22,8 +32,7 @@ skip = "*-musllinux_*"

[tool.py-build-cmake.cmake]
source_path = "."
#options = {"Boost_USE_STATIC_LIBS" = "ON", "DAKOTA_PYTHON_WRAPPER" = "ON", "CMAKE_POSITION_INDEPENDENT_CODE" = "ON", "BUILD_SHARED_LIBS"="OFF", "DAKOTA_PYTHON_DIRECT_INTERFACE" = "ON", "BOOST_LIBRARYDIR" = "/usr/lib64/boost169", "BOOST_INCLUDEDIR" = "/usr/include/boost169", "PYTHON_EXECUTABLE" = "/opt/python/cp38-cp38/bin/python", "PYTHON_INCLUDE_DIR" = "/opt/python/cp38-cp38/include", "PYTHON_LIBRARY" = "/opt/python/cp38-cp38/lib/libpython3.8.a", "PYTHON_LIBRARIES" = "/opt/python/cp38-cp38/lib/"}
options = {"DAKOTA_PYTHON_WRAPPER" = "ON", "CMAKE_POSITION_INDEPENDENT_CODE" = "ON", "BUILD_SHARED_LIBS"="OFF", "DAKOTA_PYTHON_DIRECT_INTERFACE" = "ON", "BOOST_LIBRARYDIR" = "/usr/lib64/boost169", "BOOST_INCLUDEDIR" = "/usr/include/boost169", "PYTHON_EXECUTABLE" = "/opt/python/cp38-cp38/bin/python"}
build_args = ["-j4"]
options = {"DAKOTA_PYTHON_WRAPPER" = "ON", "BUILD_SHARED_LIBS"="OFF", "CMAKE_POSITION_INDEPENDENT_CODE" = "ON", "DAKOTA_PYTHON_DIRECT_INTERFACE" = "ON", "BOOST_LIBRARYDIR" = "/usr/lib64/boost169", "BOOST_INCLUDEDIR" = "/usr/include/boost169"}
build_args = ["-j8"]
build_type = "Release"
install_components = ["dakota_for_python"]

0 comments on commit 54a48c9

Please sign in to comment.