Skip to content

Commit

Permalink
Update build options and dependencies for packages in CMake (#2)
Browse files Browse the repository at this point in the history
* Bump Zlib version and don't build unnecessary SUNDIALS libraries

* Remove extra steps to build Cantera

* Replace License file

This code is now fully independent from the former upstream at h5py

* Update SUNDIALS and fmtlib versions

* Typos in the README
  • Loading branch information
bryanwweber authored Dec 1, 2024
1 parent d88cd67 commit 923ffa0
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 51 deletions.
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ExternalProject_Add(
)

set(LIBHDF5_VERSION 1.14.5)
set(ZLIB_VERSION 1.3)
set(ZLIB_VERSION 1.3.1)
set(LIBAEC_VERSION 1.1.3)
ExternalProject_Add(
libhdf5
Expand Down Expand Up @@ -77,28 +77,33 @@ ExternalProject_Add(
DOWNLOAD_DIR ${DOWNLOAD_DIR}
)

set(SUNDIALS_VERSION 7.0.0)
set(SUNDIALS_VERSION 7.1.1)
ExternalProject_Add(
sundials
URL https://github.com/LLNL/sundials/releases/download/v${SUNDIALS_VERSION}/sundials-${SUNDIALS_VERSION}.tar.gz
URL_HASH SHA256=d762a7950ef4097fbe9d289f67a8fb717a0b9f90f87ed82170eb5c36c0a07989
URL_HASH SHA256=ea7d6edfb52448ddfdc1ec48f89a721fe6c0a259c10f8ef56f60fcded87a94bb
CMAKE_GENERATOR Ninja
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_INSTALL_LIBDIR:STRING=lib
-DBUILD_SHARED_LIBS:BOOL=OFF
-DEXAMPLES_ENABLE_C:BOOL=OFF
-DEXAMPLES_INSTALL:BOOL=OFF
-DBUILD_ARKODE:BOOL=OFF
-DBUILD_CVODE:BOOL=OFF
-DBUILD_IDA:BOOL=OFF
-DBUILD_KINSOL:BOOL=OFF
-DBUILD_CPODES:BOOL=OFF
-DENABLE_LAPACK:BOOL=ON
-DBLA_VENDOR:STRING=OpenBLAS
DOWNLOAD_DIR ${DOWNLOAD_DIR}
)

set(FMT_VERSION 10.2.1)
set(FMT_VERSION 11.0.2)
ExternalProject_Add(
fmt
URL https://github.com/fmtlib/fmt/releases/download/${FMT_VERSION}/fmt-${FMT_VERSION}.zip
URL_HASH SHA256=312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9
URL_HASH SHA256=40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465
CMAKE_GENERATOR Ninja
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
Expand Down
15 changes: 0 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,3 @@ RUN --mount=type=cache,target=/cache \
&& ninja \
&& popd \
&& rm -rf build

# FROM builder AS tester

# RUN yum install -y python3.12-pip \
# && python3.12 -m pip install --root-user-action=ignore build auditwheel

# COPY cantera-3.1.0a4.tar.gz /project/

# RUN --mount=type=cache,target=/root/.cache \
# pushd project \
# && tar --strip-components=1 -zxf cantera-*.tar.gz \
# && rm -f cantera-*.tar.gz \
# && python3.12 -m build --wheel . \
# && pushd dist \
# && auditwheel repair -w . cantera*.whl
29 changes: 0 additions & 29 deletions LICENSE

This file was deleted.

37 changes: 37 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Copyright (c) 2001-2009, California Institute of Technology
All rights reserved.

Copyright (c) 2009 Sandia Corporation. Under the terms of
Contract AC04-94AL85000 with Sandia Corporation, the U.S. Government
retains certain rights in this software.

Copyright (c) 2011-2024, Cantera Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

- Neither the name of the California Institute of Technology, Sandia
Corporation nor the names of other contributors may be used to
endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Images are published on the GitHub container registry:

- [cantera-base-manylinux_2_28-x86_64](https://github.com/orgs/Cantera/packages/container/package/cantera-base-manylinux_2_28-x86_64).
- [cantera-base-manylinux_2_28-aarch64](https://github.com/orgs/Cantera/packages/container/package/cantera-base-manylinux_2_28-aarch64).
- [cantera-base-manylinux_2_28-x86_64](https://github.com/orgs/Cantera/packages/container/package/cantera-base-manylinux_2_28-x86_64)
- [cantera-base-manylinux_2_28-aarch64](https://github.com/orgs/Cantera/packages/container/package/cantera-base-manylinux_2_28-aarch64)

0 comments on commit 923ffa0

Please sign in to comment.