Skip to content

Commit

Permalink
start building wheels for manylinx_2_28; this should help with ABI co…
Browse files Browse the repository at this point in the history
…mpatibility (#274)
  • Loading branch information
mgeplf authored Jun 7, 2023
1 parent 2a6f7e6 commit 06f5f6f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 40 deletions.
44 changes: 4 additions & 40 deletions .github/workflows/publish-sdist-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [pull_request, push]
env:
CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD: 'cp*'
CIBW_SKIP: 'cp35-* cp36-* *-musllinux_* *-manylinux_i686'
CIBW_SKIP: 'cp35-* cp36-* cp37-* *-musllinux_* *-manylinux_i686'
CIBW_TEST_COMMAND: ( cd {project}/python/tests; python -m unittest -v )

jobs:
Expand Down Expand Up @@ -34,46 +34,10 @@ jobs:
- name: Build wheels on Linux
if: runner.os == 'Linux'
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL: |
AEC_VERSION="1.0.4"
HDF5_VERSION="1.12.1"
yum update -y
yum -y install zlib-devel
pushd /tmp
echo "Downloading & unpacking aec ${AEC_VERSION}"
curl -fsSLO https://gitlab.dkrz.de/k202009/libaec/uploads/ea0b7d197a950b0c110da8dfdecbb71f/libaec-${AEC_VERSION}.tar.gz
tar zxf libaec-$AEC_VERSION.tar.gz
echo "Building & installing libaec"
pushd libaec-$AEC_VERSION
./configure
make -j 2
make install
ldconfig
popd
echo "Downloading & unpacking HDF5 ${HDF5_VERSION}"
curl -fsSLO "https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz"
tar -xzvf hdf5-$HDF5_VERSION.tar.gz
echo "Building & installing HDF5"
pushd hdf5-$HDF5_VERSION
./configure \
--prefix=/usr \
--enable-build-mode=production \
--with-szlib \
--enable-tools=no \
--enable-tests=no
make -j 2
make install
ldconfig
popd
run: |
python -m cibuildwheel --output-dir dist
# note: config is stored in pyproject.toml now
CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014 python -m cibuildwheel --output-dir dist
CIBW_MANYLINUX_X86_64_IMAGE=manylinux_2_28 python -m cibuildwheel --output-dir dist
- name: Build wheels Mac OS
if: runner.os == 'macOS'
Expand Down
35 changes: 35 additions & 0 deletions ci/ci-buildwheel-prepare-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
AEC_VERSION="1.0.4"
HDF5_VERSION="1.12.1"

yum update -y
yum -y install zlib-devel
pushd /tmp

echo "Downloading & unpacking aec ${AEC_VERSION}"
curl -fsSLO https://gitlab.dkrz.de/k202009/libaec/uploads/ea0b7d197a950b0c110da8dfdecbb71f/libaec-${AEC_VERSION}.tar.gz
tar zxf libaec-$AEC_VERSION.tar.gz

echo "Building & installing libaec"
pushd libaec-$AEC_VERSION
./configure
make -j 2
make install
ldconfig
popd

echo "Downloading & unpacking HDF5 ${HDF5_VERSION}"
curl -fsSLO "https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz"
tar -xzvf hdf5-$HDF5_VERSION.tar.gz

echo "Building & installing HDF5"
pushd hdf5-$HDF5_VERSION
./configure \
--prefix=/usr \
--enable-build-mode=production \
--with-szlib \
--enable-tools=no \
--enable-tests=no
make -j 2
make install
ldconfig
popd
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ requires = [
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel.linux]
before-all = "bash ci/ci-buildwheel-prepare-linux.sh"

0 comments on commit 06f5f6f

Please sign in to comment.