-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
executable file
·45 lines (41 loc) · 1.67 KB
/
build.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
44
#!/usr/bin/env bash
# This attempts to detect the local architecture and build for it. Otherwise,
# override by passing an architecture values (x86_64, aarch64, arm64).
# aarch64 and arm64 are synonyms.
set -e
export makeindex=true
case "$1" in
x86_64)
export baseimage=quay.io/pypa/manylinux2014_x86_64
;;
aarch64 | arm64)
export baseimage=quay.io/pypa/manylinux_2_28_aarch64
export makeindex=false
;;
*)
if [ $(arch) == "arm64" ] || [ $(arch) == "aarch64" ]; then
export baseimage=quay.io/pypa/manylinux_2_28_aarch64
export makeindex=false
else
export baseimage=quay.io/pypa/manylinux2014_x86_64
fi
;;
esac
docker pull "${baseimage}":latest
## for testing, build locally via
# docker build --force-rm --build-arg PYPY=false --build-arg baseimage=quay.io/pypa/manylinux2014_x86_64 .
docker build --force-rm -t girder/large_image_wheels --build-arg PYPY=false --build-arg baseimage=${baseimage} .
mkdir -p wheels
ls -al wheels
rm -f wheels/*.whl
docker run -v `pwd`/wheels:/opt/mount --rm --entrypoint bash girder/large_image_wheels -c 'cp --preserve=timestamps /io/wheelhouse/{pylibtiff,Glymur,GDAL,mapnik,openslide_python,pyvips,pylibmc,python_javabridge}*many* /opt/mount/. && cp --preserve=timestamps /io/wheelhouse/*bioformats*.whl /opt/mount/. && chown '`id -u`':'`id -g`' /opt/mount/*.whl'
# rm -f wheels/*none*.whl
# cp --preserve=timestamps wheels/*.whl wheelhouse/.
if [ "$makeindex" == "true" ]; then
python3 copy_changed.py
python3 make_index.py
fi
python3 make_index.py wheels
ls -al wheels
# python3 check_versions.py > versions.txt
git diff versions.txt | cat