Skip to content

Commit

Permalink
INFRA: Fix the wheel build (celiagg#108)
Browse files Browse the repository at this point in the history
Now with Harfbuzz!
  • Loading branch information
jwiggins authored Jan 22, 2023
1 parent 5dc6a84 commit 35bb09c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ jobs:
steps:
- name: Check out the release commit
uses: actions/checkout@v3
- name: Build manylinux Python wheels
uses: RalfG/[email protected]
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
build-requirements: 'cython numpy'
system-packages: 'zlib-devel'
pre-build-command: 'sh ci/build-wheel-deps.sh'
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -46,12 +53,6 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools
python -m pip install twine
- name: Build manylinux Python wheels
uses: RalfG/[email protected]
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
build-requirements: 'cython numpy'
pre-build-command: 'sh ci/build-wheel-deps.sh'
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
53 changes: 30 additions & 23 deletions ci/build-wheel-deps.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
#!/bin/bash
set -e -x

PACKAGES=(
zlib-1.2.11
libpng-1.6.37
freetype-2.10.4
harfbuzz-2.6.4
)
LIBPNG=libpng-1.6.37
curl -L "https://downloads.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.gz" -o $LIBPNG.tar.gz
tar zxf $LIBPNG.tar.gz
pushd $LIBPNG
./configure
make -j $(nproc)
make install
popd

URLS=(
https://www.zlib.net/zlib-1.2.11.tar.gz
https://downloads.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.gz
https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.gz
https://github.com/harfbuzz/harfbuzz/archive/2.6.4.tar.gz
)
LIBFREETYPE=freetype-2.12.1
curl -L "https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz" -o $LIBFREETYPE.tar.gz
tar zxf $LIBFREETYPE.tar.gz
pushd $LIBFREETYPE
./configure
make -j $(nproc)
make install
popd

for idx in {0..3}; do
PACK=${PACKAGES[$idx]}
URL=${URLS[$idx]}
curl -L "${URL}" -o ${PACK}.tar.gz
tar zxf ${PACK}.tar.gz
pushd ${PACK}
./configure
make
make install
popd
done
LIBHARFBUZZ=harfbuzz-2.6.8
curl -L "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/2.6.8.tar.gz" -o $LIBHARFBUZZ.tar.gz
tar zxf $LIBHARFBUZZ.tar.gz
pushd $LIBHARFBUZZ

# missing macro in the locally installed automake
# ref: https://github.com/pypa/manylinux/issues/731
cp /usr/share/aclocal/pkg.m4 /usr/local/share/aclocal

./autogen.sh
./configure
make -j $(nproc)
make install
popd

0 comments on commit 35bb09c

Please sign in to comment.