Skip to content

Commit 873ff9b

Browse files
committed
ci: wheel building update
1 parent 02946db commit 873ff9b

File tree

3 files changed

+45
-26
lines changed

3 files changed

+45
-26
lines changed

.github/workflows/wheels.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
matrix:
1313
buildplat:
1414
- { runs_on: ubuntu-20.04, sys: manylinux, arch: x86_64, benv: "" }
15-
- { runs_on: macos-12, sys: macosx, arch: x86_64, benv: "12.0" }
15+
- { runs_on: ubuntu-20.04, sys: musllinux, arch: x86_64, benv: "" }
16+
- { runs_on: ubuntu-20.04, sys: musllinux, arch: aarch64, benv: "" }
1617
- { runs_on: macos-14, sys: macosx, arch: arm64, benv: "14.0" }
1718
python:
1819
- { cp: "cp38", rel: "3.8" }
@@ -33,8 +34,8 @@ jobs:
3334
- name: Install cibuildwheel
3435
run: python -m pip install cibuildwheel
3536

36-
- name: Build wheels (Linux)
37-
if: ${{ runner.os != 'macOS' }}
37+
- name: Build wheels (Linux glibc)
38+
if: ${{ matrix.buildplat.sys == 'manylinux' }}
3839
run: python -m cibuildwheel --output-dir wheelhouse
3940
env:
4041
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}*
@@ -50,11 +51,25 @@ jobs:
5051
rsync -av --ignore-existing /usr/share/aclocal/*.m4 /usr/local/share/aclocal/
5152
fi &&
5253
./build-deps.sh
53-
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64
54+
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
55+
CIBW_SKIP: "*-win* *-manylinux_i686 pp*"
56+
57+
- name: Build wheels (Linux musl)
58+
if: ${{ matrix.buildplat.sys == 'musllinux' }}
59+
run: python -m cibuildwheel --output-dir wheelhouse
60+
env:
61+
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}*
62+
CIBW_ARCHS_LINUX: "x86_64 aarch64"
63+
CIBW_BEFORE_ALL_LINUX: >
64+
apk add build-base git autoconf-archive autoconf automake libtool bzip2-dev icu-dev libxml2-dev libexttextcat-dev libtool rsync &&
65+
mkdir -p /usr/local/share/aclocal/ && rsync -av --ignore-existing /usr/share/aclocal/*.m4 /usr/local/share/aclocal/ &&
66+
./build-deps.sh
67+
CIBW_MUSLLINUX_X86_64_IMAGE: quay.io/pypa/musllinux_1_1_x86_64
68+
CIBW_MUSLLINUX_AARCH64_IMAGE: quay.io/pypa/musllinux_1_1_aarch64
5469
CIBW_SKIP: "*-win* *-manylinux_i686 pp*"
5570

5671
- name: Build wheels (macOS)
57-
if: ${{ runner.os == 'macOS' && runner.python != '3.8' }}
72+
if: ${{ runner.os == 'macOS' && matrix.python.cp != 'cp38' }}
5873
run: python -m cibuildwheel --output-dir wheelhouse
5974
env:
6075
CIBW_BUILD: ${{ matrix.python.cp }}-${{ matrix.buildplat.sys }}*
@@ -65,7 +80,7 @@ jobs:
6580
brew install frog
6681
6782
- uses: actions/upload-artifact@v4
68-
if: ${{ ! (runner.os == 'macOS' && runner.python == '3.8') }}
83+
if: ${{ ! (runner.os == 'macOS' && matrix.python.cp == '3.8') }}
6984
with:
7085
name: ${{matrix.python.cp}}-${{matrix.buildplat.sys}}-${{matrix.buildplat.arch}}
7186
path: ./wheelhouse/*.whl

build-deps.sh

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
set -e
88

99
. /etc/os-release
10+
echo "OS: $ID">&2
11+
echo "VERSION: $VERSION_ID">&2
1012

1113
get_latest_version() {
1214
#Finds the latest git tag or falls back to returning the git default branch (usually master or main)
@@ -27,24 +29,27 @@ if [ "$ID" = "almalinux" ] || [ "$ID" = "centos" ] || [ "$ID" = "rhel" ]; then
2729
#needed for manylinux_2_28 container which ships custom autoconf, possibly others too?
2830
export ACLOCAL_PATH=/usr/share/aclocal
2931
fi
30-
if [ "$VERSION_ID" = "7" ]; then
31-
yum install -y libexttextcat-devel
32-
if [ -d /opt/rh/devtoolset-10/root/usr/lib ]; then
33-
#we are running in the manylinux2014 image
34-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/rh/devtoolset-10/root/usr/lib
35-
#libxml2 is out of date, compile and install a new one
36-
yum install -y xz
37-
wget https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz
38-
unxz libxml2-2.9.14.tar.xz
39-
tar -xf libxml2-2.9.14.tar
40-
cd libxml2-2.9.14 && ./configure --prefix=$PREFIX --without-python && make && make install
41-
cd ..
42-
fi
43-
elif [ "$VERSION_ID" = "8" ]; then
44-
#they forgot to package libexttextcat-devel? grab one manually:
45-
wget https://github.com/proycon/LaMachine/raw/master/deps/centos8/libexttextcat-devel-3.4.5-2.el8.x86_64.rpm
46-
yum install -y libexttextcat-devel-3.4.5-2.el8.x86_64.rpm
47-
fi
32+
case $VERSION_ID in
33+
7*)
34+
yum install -y libexttextcat-devel
35+
if [ -d /opt/rh/devtoolset-10/root/usr/lib ]; then
36+
#we are running in the manylinux2014 image
37+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/rh/devtoolset-10/root/usr/lib
38+
#libxml2 is out of date, compile and install a new one
39+
yum install -y xz
40+
wget https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz
41+
unxz libxml2-2.9.14.tar.xz
42+
tar -xf libxml2-2.9.14.tar
43+
cd libxml2-2.9.14 && ./configure --prefix=$PREFIX --without-python && make && make install
44+
cd ..
45+
fi
46+
;;
47+
8*)
48+
#they forgot to package libexttextcat-devel? grab one manually:
49+
wget https://github.com/proycon/LaMachine/raw/master/deps/centos8/libexttextcat-devel-3.4.5-2.el8.x86_64.rpm
50+
yum install -y libexttextcat-devel-3.4.5-2.el8.x86_64.rpm
51+
;;
52+
esac
4853
fi
4954

5055
PWD="$(pwd)"
@@ -77,5 +82,4 @@ for PACKAGE in LanguageMachines/ticcutils LanguageMachines/libfolia LanguageMach
7782
done
7883
cd $PWD
7984
[ -n "$BUILDDIR" ] && rm -Rf "$BUILDDIR"
80-
8185
echo "Dependencies installed" >&2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
setup(
6868
name = 'python-frog',
69-
version = '0.6.10', #also ensure UCTODATAVERSION and FROGDATAVERSION are good in frog_wrapper.pyx
69+
version = '0.6.11', #also ensure UCTODATAVERSION and FROGDATAVERSION are good in frog_wrapper.pyx
7070
author = "Maarten van Gompel",
7171
author_email = "[email protected]",
7272
description = ("Python binding to Frog, an NLP suite for Dutch doing part-of-speech tagging, lemmatisation, morphological analysis, named-entity recognition, shallow parsing, and dependency parsing."),

0 commit comments

Comments
 (0)