Skip to content

Commit

Permalink
start of pyvips
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Jun 1, 2024
1 parent 2ec9bfe commit 29c01e4
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/pyvips/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ghcr.io/bjia56/armv7l-wheel-builder:main
ARG PYTHON_VERSION
ARG VERSION
ARG OUTPUT_DIR

RUN mkdir /vips
RUN wget https://github.com/libvips/libvips/releases/download/v8.15.2/vips-8.15.2.tar.xz && \
tar xf vips-*.tar.xz && \
cd vips-* && \
./configure --prefix=/vips && \
make -j4 && \
make install

RUN /repo/armv7l_build_wheels.sh ${PYTHON_VERSION} ${VERSION}

RUN mkdir -p ${OUTPUT_DIR} && \
cp build${PYTHON_VERSION}/wheelhouse/pyvips*manylinux*armv7l.whl ${OUTPUT_DIR}
31 changes: 31 additions & 0 deletions packages/pyvips/armv7l_build_wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

PYTHON3_VERSION=$1
PACKAGE_VERSION=$2

set -e

build_wheel() (
PY_VER=$1
VER=$2
mkdir build$PY_VER
cd build$PY_VER
pip$PY_VER wheel --no-deps pyvips==$VER
)

test_wheel() (
PY_VER=$1
cd build$PY_VER
pip$PY_VER install wheelhouse/pyvips*manylinux*armv7l.whl --extra-index-url https://bjia56.github.io/armv7l-wheels/ --prefer-binary
python$PY_VER -c "import pyvips; print(pyvips)"
)

repair_wheel() (
PY_VER=$1
cd build$PY_VER
auditwheel repair pyvips*armv7l.whl
)

build_wheel $PYTHON3_VERSION $PACKAGE_VERSION
repair_wheel $PYTHON3_VERSION
test_wheel $PYTHON3_VERSION
16 changes: 16 additions & 0 deletions packages/pyvips/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
strategy: dockerfile
source:
- ./Dockerfile

python:
versions:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

package:
versions:
- latest

0 comments on commit 29c01e4

Please sign in to comment.