From 5e8725c85bbf85efd0d42bb6ba1b1ee6a399d24d Mon Sep 17 00:00:00 2001 From: jcschaff Date: Thu, 12 Sep 2024 09:23:38 -0400 Subject: [PATCH] add libzip submodule to source build it as static lib on all platforms --- .github/workflows/cd.yml | 4 ---- .github/workflows/pip.yml | 19 ++++++++----------- .gitmodules | 3 +++ CMakeLists.txt | 4 ++-- bridgeVCellSmoldyn/CMakeLists.txt | 2 +- extern/libzip | 1 + 6 files changed, 15 insertions(+), 18 deletions(-) create mode 160000 extern/libzip diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3641497f7..d3ee75e06 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -71,7 +71,6 @@ jobs: run: | brew install boost brew install hdf5 - brew install libzip brew install ninja brew install llvm @@ -91,7 +90,6 @@ jobs: run: | brew install boost brew install hdf5 - brew install libzip brew install ninja brew install llvm @@ -119,7 +117,6 @@ jobs: mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-boost mingw-w64-clang-x86_64-hdf5 - mingw-w64-clang-x86_64-libzip mingw-w64-clang-x86_64-zlib mingw-w64-clang-x86_64-libaec @@ -129,7 +126,6 @@ jobs: sudo apt-get update sudo apt-get install -y libboost-all-dev sudo apt-get install -y libhdf5-dev - sudo apt-get install -y libzip-dev sudo apt-get install -y ninja-build gcc --version diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml index c16194eec..36abc8e1f 100644 --- a/.github/workflows/pip.yml +++ b/.github/workflows/pip.yml @@ -37,7 +37,6 @@ jobs: run: | brew install boost brew install hdf5 - brew install libzip brew install ninja brew install llvm @@ -57,7 +56,6 @@ jobs: run: | brew install boost brew install hdf5 - brew install libzip brew install ninja brew install llvm @@ -85,7 +83,6 @@ jobs: mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-boost mingw-w64-clang-x86_64-hdf5 - mingw-w64-clang-x86_64-libzip mingw-w64-clang-x86_64-zlib mingw-w64-clang-x86_64-libaec mingw-w64-clang-x86_64-python-pip-tools @@ -136,9 +133,9 @@ jobs: - name: Build and install manylinux for python 3.9 run: | - docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \ + docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_28_x86_64 \ /bin/bash -c \ - "yum install -y boost-devel hdf5-devel libzip-devel ninja-build && \ + "yum install -y boost-devel hdf5-devel ninja-build && \ /opt/python/cp39-cp39/bin/pip wheel /io/ -w /io/dist && \ auditwheel repair /io/dist/*.whl -w /io/dist/" echo "keeping only the manylinux wheels, remove those with -linux_x86_64.whl in the name" @@ -148,9 +145,9 @@ jobs: - name: Build and install manylinux for python 3.10 run: | - docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \ + docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_28_x86_64 \ /bin/bash -c \ - "yum install -y boost-devel hdf5-devel libzip-devel ninja-build && \ + "yum install -y boost-devel hdf5-devel ninja-build && \ /opt/python/cp310-cp310/bin/pip wheel /io/ -w /io/dist && \ auditwheel repair /io/dist/*.whl -w /io/dist/" echo "keeping only the manylinux wheels, remove those with -linux_x86_64.whl in the name" @@ -160,9 +157,9 @@ jobs: - name: Build and install manylinux for python 3.11 run: | - docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \ + docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_28_x86_64 \ /bin/bash -c \ - "yum install -y boost-devel hdf5-devel libzip-devel ninja-build && \ + "yum install -y boost-devel hdf5-devel ninja-build && \ /opt/python/cp311-cp311/bin/pip wheel /io/ -w /io/dist && \ auditwheel repair /io/dist/*.whl -w /io/dist/" echo "keeping only the manylinux wheels, remove those with -linux_x86_64.whl in the name" @@ -172,9 +169,9 @@ jobs: - name: Build and install manylinux for python 3.12 run: | - docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \ + docker run --rm -v $(pwd):/io quay.io/pypa/manylinux_2_28_x86_64 \ /bin/bash -c \ - "yum install -y boost-devel hdf5-devel libzip-devel ninja-build && \ + "yum install -y boost-devel hdf5-devel ninja-build && \ /opt/python/cp312-cp312/bin/pip wheel /io/ -w /io/dist && \ auditwheel repair /io/dist/*.whl -w /io/dist/" echo "keeping only the manylinux wheels, remove those with -linux_x86_64.whl in the name" diff --git a/.gitmodules b/.gitmodules index a2000f25e..dca7010bf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "libzippp"] path = libzippp url = https://github.com/ctabin/libzippp.git +[submodule "extern/libzip"] + path = extern/libzip + url = https://github.com/nih-at/libzip.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 9778cd7de..72fa98042 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,8 +129,6 @@ include(GetGitRevisionDescription) git_describe(GIT_DESCRIBE ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR) include (FindZLIB) -include (FindLIBZIP) - if (NOT OPTION_TARGET_PYTHON_BINDING) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) @@ -201,6 +199,8 @@ add_subdirectory(VCellMessaging) add_subdirectory(VCellZipUtils) +add_subdirectory(extern/libzip) + add_subdirectory(libzippp) add_subdirectory(ExpressionParser) diff --git a/bridgeVCellSmoldyn/CMakeLists.txt b/bridgeVCellSmoldyn/CMakeLists.txt index 4dc4c29e7..706da633f 100644 --- a/bridgeVCellSmoldyn/CMakeLists.txt +++ b/bridgeVCellSmoldyn/CMakeLists.txt @@ -5,7 +5,7 @@ file (GLOB HEADER_FILES *.h) file (GLOB SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) list(REMOVE_ITEM SOURCE_FILES ${VCELL_SMOL_MAIN}) -add_library(vcellsmoldynbridge ${HEADER_FILES} ${SOURCE_FILES}) +add_library(vcellsmoldynbridge STATIC ${HEADER_FILES} ${SOURCE_FILES}) target_link_libraries(vcellsmoldynbridge vcell smoldyn_static) target_include_directories(vcellsmoldynbridge PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_definitions(vcellsmoldynbridge PUBLIC -DVCELL_HYBRID -DVCELL -D_CRT_SECURE_NO_WARNINGS) diff --git a/extern/libzip b/extern/libzip new file mode 160000 index 000000000..6593c060a --- /dev/null +++ b/extern/libzip @@ -0,0 +1 @@ +Subproject commit 6593c060a32f882c5135c2e72d59982137f553d0