Skip to content

Commit db31859

Browse files
fixing linux includes
1 parent 30792a2 commit db31859

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/build_wheels.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ jobs:
2929
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
3030
run: |
3131
sudo apt update
32-
sudo apt install -y gfortran cmake ninja-build libboost-all-dev libzip-dev libhdf5-dev libbz2-dev libssl-dev liblzma-dev
32+
sudo apt install -y wget gfortran cmake ninja-build libboost-all-dev libzip-dev libhdf5-dev libbz2-dev libssl-dev liblzma-dev
33+
34+
# for some reason, there aren't headers included in libzip-dev???? so we're building from source!
35+
mkdir ../libzip-source
36+
wget https://libzip.org/download/libzip-1.11.3.tar.gz
37+
tar -xzvf libzip-1.11.3.tar.gz -C ../libzip-source
38+
cmake -S ../libzip-source/libzip-1.11.3 -B ../libzip-source/libzip-1.11.3/build -G Ninja
39+
cmake --build ../libzip-source/libzip-1.11.3/build
40+
sudo cmake --install ../libzip-source/libzip-1.11.3/build
41+
echo "Confirming header presence..."
3342
3443
- name: Install Intel MacOS Dependencies
3544
if: matrix.os == 'macos-13'
@@ -119,12 +128,23 @@ jobs:
119128
# output-dir: wheelhouse
120129
# config-file: "{package}/pyproject.toml"
121130

122-
- name: Build Wheels (Linux)
131+
- name: Build Wheels (Linux<ARM>)
123132
uses: pypa/cibuildwheel@v2.23.2
124-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
133+
if: matrix.os == 'ubuntu-24.04-arm'
134+
env:
135+
CIBW_BUILD: ${{ matrix.python_version }}
136+
CIBW_BEFORE_BUILD: "pip install h5py && export LIBZIP_INCLUDE_DIR=/usr/local/include && export LIBZIP_LIBRARY=/usr/local/lib/libzip.so"
137+
# with:
138+
# package-dir: .
139+
# output-dir: wheelhouse
140+
# config-file: "{package}/pyproject.toml"
141+
142+
- name: Build Wheels (Linux<x86_64>)
143+
uses: pypa/cibuildwheel@v2.23.2
144+
if: matrix.os == 'ubuntu-latest'
125145
env:
126-
LIBZIP_INCLUDE_DIR: '/usr/include/zip.h'
127146
CIBW_BUILD: ${{ matrix.python_version }}
147+
CIBW_BEFORE_BUILD: "pip install h5py && export LIBZIP_INCLUDE_DIR=/usr/local/include && export LIBZIP_LIBRARY=/usr/local/lib/libzip.so"
128148
# with:
129149
# package-dir: .
130150
# output-dir: wheelhouse

0 commit comments

Comments
 (0)