Skip to content

Commit

Permalink
add libzip to pip builds on manylinux, verify libzip in CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jan 19, 2025
1 parent da4f5cb commit 8987e6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
run: |
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \
/bin/bash -c \
"yum install -y boost-devel hdf5-devel ninja-build && \
"yum install -y boost-devel hdf5-devel libzip-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"
Expand All @@ -151,7 +151,7 @@ jobs:
run: |
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \
/bin/bash -c \
"yum install -y boost-devel hdf5-devel ninja-build && \
"yum install -y boost-devel hdf5-devel libzip-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"
Expand All @@ -163,7 +163,7 @@ jobs:
run: |
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \
/bin/bash -c \
"yum install -y boost-devel hdf5-devel ninja-build && \
"yum install -y boost-devel hdf5-devel libzip-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"
Expand All @@ -175,7 +175,7 @@ jobs:
run: |
docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 \
/bin/bash -c \
"yum install -y boost-devel hdf5-devel ninja-build && \
"yum install -y boost-devel hdf5-devel libzip-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"
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ git_describe(GIT_DESCRIBE ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)
include (FindZLIB)
include (FindLIBZIP)

# help CMake find libzip
if (APPLE)
execute_process(COMMAND brew --prefix libzip OUTPUT_VARIABLE LIBZIP_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${LIBZIP_PREFIX})
endif()
find_package(LIBZIP REQUIRED)


if (NOT OPTION_TARGET_PYTHON_BINDING)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down Expand Up @@ -192,6 +199,8 @@ endif()

#CMakeList.txt that comes with hdf5 switches library name if compiled with debug
if (APPLE)
execute_process(COMMAND brew --prefix libaec OUTPUT_VARIABLE LIBAEC_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${LIBAEC_PREFIX})
find_package(libaec REQUIRED)
endif()
find_package(HDF5 COMPONENTS HL CXX C)
Expand Down

0 comments on commit 8987e6a

Please sign in to comment.