forked from matthew-brett/manylinux-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_pillows.sh
executable file
·43 lines (37 loc) · 1.27 KB
/
build_pillows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Run with:
# docker run --rm -v $PWD:/io quay.io/pypa/manylinux1_x86_64 /io/build_pillows.sh
# or something like:
# docker run --rm -e PYTHON_VERSIONS=2.7 -v $PWD:/io quay.io/pypa/manylinux1_x86_64 /io/build_pillows.sh
# or:
# docker run --rm -e PILLOW_VERSIONS=3.2 -e PYTHON_VERSIONS=2.7 -v $PWD:/io quay.io/pypa/manylinux1_x86_64 /io/build_pillows.sh
set -e
# Manylinux, openblas version, lex_ver
source /io/common_vars.sh
if [ -z "$PILLOW_VERSIONS" ]; then
PILLOW_VERSIONS="1.7.6 1.7.7 1.7.8 2.1.0 2.5.1 2.6.0 2.6.1 2.9.0 3.0 3.1.0 3.1.1 3.1.2 3.2"
fi
source /io/multibuild/library_builders.sh
build_jpeg
build_tiff
build_openjpeg
build_lcms2
build_libwebp
build_freetype
# Directory to store wheels
rm_mkdir unfixed_wheels
# Compile wheels
for PYTHON in ${PYTHON_VERSIONS}; do
PIP="$(cpython_path $PYTHON $UNICODE_WIDTH)/bin/pip"
for PILLOW in ${PILLOW_VERSIONS}; do
if [ $(lex_ver $PYTHON) -ge $(lex_ver 3) ] &&
[ $(lex_ver $PILLOW) -lt $(lex_ver 2) ] ; then
continue
fi
echo "Building pillow $PILLOW for Python $PYTHON"
$PIP wheel --no-deps -w unfixed_wheels \
"pillow==$PILLOW"
done
done
# Bundle external shared libraries into the wheels
repair_wheelhouse unfixed_wheels $WHEELHOUSE