-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
2719 lines (2605 loc) · 122 KB
/
Dockerfile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
ARG baseimage
FROM ${baseimage:-quay.io/pypa/manylinux2014_x86_64}
# FROM quay.io/pypa/manylinux2014_x86_64
# With docker build-kit, to debug a specific build step, use
# FROM quay.io/pypa/manylinux2014_x86_64 as working
# and add just before the build step to debug
# FROM working
# Then do
# docker build --force-rm --target=working .
RUN mkdir /build
WORKDIR /build
RUN \
echo "`date` yum install" >> /build/log.txt && \
yum install -y \
# for strip-nondeterminism \
cpanminus \
# for curl \
libidn2-devel \
# needed for libtiff \
freeglut-devel \
libXi-devel \
mesa-libGL-devel \
mesa-libGLU-devel \
SDL-devel \
chrpath \
# for javabridge \
java-1.8.0-openjdk-devel \
zip \
# for glib2 \
libtool \
libxml2-devel \
# for gobject-introspection \
flex \
# for several packages \
ninja-build \
help2man \
texinfo \
# for boost \
gettext-devel \
libcroco-devel \
# for expat \
docbook2X \
gperf \
# for libdap \
libuuid-devel \
# for mysql \
ncurses-devel \
# for postrges \
readline-devel \
# for epsilon \
bzip2-devel \
popt-devel \
# for MrSID \
tbb-devel \
# for easier development \
man \
gtk-doc \
vim-enhanced \
&& \
if [ "$AUDITWHEEL_ARCH" == "x86_64" ]; then \
yum install -y \
# for librasterlite2 \
fcgi-devel \
# more support for GDAL \
json-c12-devel \
# for netcdf \
hdf-devel \
# needed for mysql to use newer versions of xz with mysql \
devtoolset-11-gcc \
devtoolset-11-gcc-c++ \
devtoolset-11-binutils \
&& true; \
elif [ "$AUDITWHEEL_ARCH" == "aarch64" ]; then \
yum install -y \
# more support for GDAL \
json-c-devel.aarch64 \
# needed for mysql to use newer versions of xz with mysql \
gcc-toolset-13-gcc \
gcc-toolset-13-gcc-c++ \
gcc-toolset-13-binutils \
gcc-toolset-13-annobin-annocheck \
gcc-toolset-13-annobin-plugin-gcc \
&& true; \
fi && \
yum clean all && \
echo "`date` yum install" >> /build/log.txt
ARG PYPY
# Don't build some versions of python.
RUN \
echo "`date` rm python versions" >> /build/log.txt && \
mkdir /opt/py && \
ln -s /opt/python/* /opt/py/. && \
# Enable all versions in boost as well \
rm -rf /opt/py/cp36* && \
rm -rf /opt/py/cp37* && \
# We can't handle the no-gil variant yet (openslide-python fails) \
rm -rf /opt/py/cp313-cp313t && \
if [ "$PYPY" = true ]; then \
echo "Only building pypy versions" && \
rm -rf /opt/py/cp* && \
true; \
elif [ "$PYPY" = false ]; then \
echo "Only building cpython versions" && \
rm -rf /opt/py/pp* && \
true; \
else \
echo "Building cpython and pypy versions" && \
true; \
fi && \
echo "`date` rm python versions" >> /build/log.txt
ARG SOURCE_DATE_EPOCH
ENV SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-1667497300} \
HOSTNAME=large_image_wheels \
CFLAGS="-g0 -O2 -DNDEBUG" \
LDFLAGS="-Wl,--strip-debug,--strip-discarded,--discard-locals" \
PATH="/venv/bin:$PATH" \
PYTHONDONTWRITEBYTECODE=1
# PIP_USE_FEATURE="in-tree-build" \
# The manylinux environment uses a combination of LD_LIBRARY_PATH and
# ld.so.conf.d to specify library paths. Values in ld.so.conf.d are added
# first, but by default only /usr/local/lib is before some system-ish paths,
# which causes issues in some builds. This increases the priority of
# /usr/local/lib64
RUN echo "/usr/local/lib64" > /etc/ld.so.conf.d/01-manylinux.conf && \
ldconfig
# Several build steps need to be in a python 3 environment; set up a virtualenv
# with a specific version. This venv is added to the path so that it is
# available by default.
RUN \
echo "`date` virtualenv" >> /build/log.txt && \
export PATH="/opt/python/cp38-cp38/bin:$PATH" && \
pip3 install --no-cache-dir virtualenv && \
virtualenv -p python3.8 /venv && \
echo "`date` virtualenv" >> /build/log.txt
COPY getver.py fix_record.py /usr/local/bin/
# The openslide-vendor-mirax.c.patch allows girder's file layout to work with
# mirax files and does no harm otherwise.
COPY versions.txt \
glymur.setup.py \
mapnik_projection.cpp.patch \
mapnik_setup.py.patch \
openslide-vendor-mirax.c.patch \
python-javabridge.pyx.patch \
./
# Newer version of pkg-config than available in manylinux
RUN \
echo "`date` pkg-config" >> /build/log.txt && \
export JOBS=`nproc` && \
export AUTOMAKE_JOBS=`nproc` && \
until timeout 60 git clone --depth=1 --single-branch -b pkg-config-`getver.py pkg-config` -c advice.detachedHead=false https://gitlab.freedesktop.org/pkg-config/pkg-config.git; do sleep 5; echo "retrying"; done && \
cd pkg-config && \
./autogen.sh && \
./configure --silent --prefix=/usr/local --with-internal-glib --disable-host-tool --disable-static && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
echo "`date` pkg-config" >> /build/log.txt
# Some of these paths are added later
ENV PKG_CONFIG=/usr/local/bin/pkg-config \
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/share/pkgconfig
# We had been doing:
# PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig \
# but we don't want to find the built-in libraries, as if we bind to them, we
# probably are not portable.
# CMake - use a precompiled binary
RUN \
echo "`date` cmake" >> /build/log.txt && \
curl --retry 5 --silent https://github.com/Kitware/CMake/releases/download/v`getver.py cmake`/cmake-`getver.py cmake`-Linux-${AUDITWHEEL_ARCH}.tar.gz -L -o cmake.tar.gz && \
tar -zxf cmake.tar.gz -C /usr/local --strip-components 1 && \
rm -f cmake.tar.gz && \
echo "`date` cmake" >> /build/log.txt
# Make our own zlib so we don't depend on system libraries \
RUN \
echo "`date` zlib" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent https://zlib.net/zlib-`getver.py zlib`.tar.gz -L -o zlib.tar.gz && \
mkdir zlib && \
tar -zxf zlib.tar.gz -C zlib --strip-components 1 && \
rm -f zlib.tar.gz && \
cd zlib && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DZLIB_BUILD_EXAMPLES=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` zlib" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` krb5" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b krb5-`getver.py krb5`-final -c advice.detachedHead=false https://github.com/krb5/krb5.git && \
cd krb5/src && \
autoreconf -ifv && \
./configure --prefix=/usr/local && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` krb5" >> /build/log.txt && \
cd /build && \
# \
# # Make our own openssl so we don't depend on system libraries. \
# RUN \
echo "`date` openssl" >> /build/log.txt && \
# PINNED - 3.3.2 doesn't build with the perl repos present \
# git clone --depth=1 --single-branch -b openssl-`getver.py openssl` -c advice.detachedHead=false https://github.com/openssl/openssl.git openssl && \
git clone --depth=1 --single-branch -b openssl-3.3.1 -c advice.detachedHead=false https://github.com/openssl/openssl.git openssl && \
cd openssl && \
./config --prefix=/usr/local --openssldir=/usr/local/ssl shared zlib && \
make --silent -j ${JOBS} && \
# using "all install_sw" rather than "install" to avoid installing docs \
make --silent -j ${JOBS} all install_sw && \
ldconfig && \
echo "`date` openssl" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` openldap" >> /build/log.txt && \
until timeout 60 git clone --depth=1 --single-branch -b OPENLDAP_REL_ENG_`getver.py openldap` -c advice.detachedHead=false https://git.openldap.org/openldap/openldap.git; do sleep 5; echo "retrying"; done && \
cd openldap && \
# Don't build tests or docs \
sed -i 's/ tests doc//g' Makefile.in && \
./configure --silent --prefix=/usr/local --disable-slapd && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` openldap" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` libssh2" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b libssh2-`getver.py libssh2` -c advice.detachedHead=false https://github.com/libssh2/libssh2.git && \
cd libssh2 && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DENABLE_ZLIB_COMPRESSION=ON -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libssh2" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` libpsl" >> /build/log.txt && \
export JOBS=`nproc` && \
export AUTOMAKE_JOBS=`nproc` && \
git clone --depth=1 --single-branch -b `getver.py libpsl` -c advice.detachedHead=false https://github.com/rockdaboot/libpsl.git && \
cd libpsl && \
./autogen.sh && \
./configure --silent --prefix=/usr/local --disable-static && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libpsl" >> /build/log.txt && \
# \
# RUN \
cd /build && \
echo "`date` libidn2" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent https://ftp.gnu.org/gnu/libidn/libidn2-`getver.py libidn2`.tar.gz -L -o libidn2.tar.gz && \
mkdir libidn2 && \
tar -zxf libidn2.tar.gz -C libidn2 --strip-components 1 && \
rm -f libidn2.tar.gz && \
cd libidn2 && \
./configure --silent --prefix=/usr/local --disable-static && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libidn2" >> /build/log.txt && \
cd /build && \
# \
# # Make our own curl so we don't depend on system libraries. \
# RUN \
echo "`date` curl" >> /build/log.txt && \
export JOBS=`nproc` && \
# The github releases have slightly different headers and are prefered \
# git clone --depth=1 --single-branch -b curl-`getver.py curl` -c advice.detachedHead=false https://github.com/curl/curl.git && \
curl --retry 5 --silent https://github.com/curl/curl/releases/download/curl-`getver.py curl`/curl-`getver.py curl 3 _ .`.tar.gz -L -o curl.tar.gz && \
mkdir curl && \
tar -zxf curl.tar.gz -C curl --strip-components 1 && \
rm -f curl.tar.gz && \
cd curl && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DBUILD_STATIC=OFF -DCURL_CA_FALLBACK=ON -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
# Installing our own curl breaks the python 2.7 pycurl used by yum. This \
# is annoying, so patch the yum script in case we want to use it later \
python -c $'# \n\
path = "/usr/bin/yum" \n\
s = open(path).read().replace( \n\
"import sys", \n\
"""import ctypes \n\
ctypes.cdll.LoadLibrary("/usr/lib64/libcurl.so.4") \n\
ctypes.cdll.LoadLibrary("/usr/lib64/liblzma.so.5") \n\
import os \n\
os.environ["LD_LIBRARY_PATH"] = "/usr/lib64:" + os.environ["LD_LIBRARY_PATH"] \n\
import sys""") \n\
open(path, "w").write(s)' && \
echo "`date` curl" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` zlib-ng" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b `getver.py zlib-ng` -c advice.detachedHead=false https://github.com/zlib-ng/zlib-ng.git zlib-ng && \
cd zlib-ng && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DINSTALL_GTEST=OFF -DBUILD_GMOCK=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
/usr/bin/cp -f ./libz* /usr/local/lib/. && \
echo "`date` zlib-ng" >> /build/log.txt
RUN \
echo "`date` strip-nondeterminism" >> /build/log.txt && \
cpanm Archive::Cpio && \
git clone --depth=1 --single-branch -b `getver.py strip-nondeterminism` -c advice.detachedHead=false https://github.com/esoule/strip-nondeterminism.git && \
cd strip-nondeterminism && \
perl Makefile.PL && \
make && \
make install && \
echo "`date` strip-nondeterminism" >> /build/log.txt
# PINNED - patchelf 0.17.0 (specifically
# https://github.com/NixOS/patchelf/pull/430) breaks some of our output - see
# https://github.com/pypa/manylinux/issues/1421
RUN \
echo "`date` patchelf" >> /build/log.txt && \
export JOBS=`nproc` && \
# git clone --depth=1 --single-branch -b `getver.py patchelf` -c advice.detachedHead=false https://github.com/NixOS/patchelf && \
git clone --depth=1 --single-branch -b 0.16.1 -c advice.detachedHead=false https://github.com/NixOS/patchelf && \
cd patchelf && \
./bootstrap.sh && \
./configure --silent --prefix=/usr/local && \
make -j `nproc` && \
make -j `nproc` install && \
ldconfig && \
echo "`date` patchelf" >> /build/log.txt
# Install a utility to recompress wheel (zip) files to make them smaller
RUN \
echo "`date` advancecomp" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent https://github.com/amadvance/advancecomp/releases/download/v`getver.py advancecomp`/advancecomp-`getver.py advancecomp`.tar.gz -L -o advancecomp.tar.gz && \
mkdir advancecomp && \
tar -zxf advancecomp.tar.gz -C advancecomp --strip-components 1 && \
rm -f advancecomp.tar.gz && \
cd advancecomp && \
export CFLAGS="$CFLAGS -O3" && \
export CXXFLAGS="$CXXFLAGS -O3" && \
./configure --silent --prefix=/usr/local && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
# Because we will recompress all wheels, we can create them with no \
# compression to save some time \
sed -i 's/ZIP_DEFLATED/ZIP_STORED/g' /opt/_internal/pipx/venvs/auditwheel/lib/python3.12/site-packages/auditwheel/tools.py && \
echo "`date` advancecomp" >> /build/log.txt
RUN \
echo "`date` auditwheel" >> /build/log.txt && \
# vips doesn't work with auditwheel 3.2 since the copylib doesn't adjust \
# rpaths the same as 3.1.1. Revert that aspect of the behavior. \
sed -i 's/patcher.set_rpath(dest_path, dest_dir)/new_rpath = os.path.relpath(dest_dir, os.path.dirname(dest_path))\n new_rpath = os.path.join('\''$ORIGIN'\'', new_rpath)\n patcher.set_rpath(dest_path, new_rpath)/g' /opt/_internal/pipx/venvs/auditwheel/lib/python3.12/site-packages/auditwheel/repair.py && \
# Tell auditwheel not to whitelist libz.so, libiXext.so, etc. \
# Do whitelist libjvm.so \
python -c $'# \n\
import os \n\
path = os.popen("find /opt/_internal -name manylinux-policy.json").read().strip() \n\
data = open(path).read().replace( \n\
"libz.so.1", "Xlibz.so.1").replace( \n\
"ZLIB", "XXZLIB").replace( \n\
"libXext.so.6", "XlibXext.so.6").replace( \n\
"libXrender.so.1", "XlibXrender.so.1").replace( \n\
"libX11.so.6", "XlibX11.so.6").replace( \n\
"libSM.so.6", "XlibSM.so.6").replace( \n\
"libICE.so.6", "XlibICE.so.6").replace( \n\
"libexpat.so.1", "Xlibexpat.so.1").replace( \n\
"libgobject-2.0.so.0", "Xlibgobject-2.0.so.0").replace( \n\
"libgthread-2.0.so.0", "Xlibgthread-2.0.so.0").replace( \n\
"libglib-2.0.so.0", "Xlibglib-2.0.so.0").replace( \n\
"XlibXext.so.6", "libjvm.so") \n\
open(path, "w").write(data)' && \
echo "`date` auditwheel" >> /build/log.txt
# Use an older version of numpy -- we can work with newer versions, but have to
# have at least this version to use our wheels.
RUN \
echo "`date` numpy" >> /build/log.txt && \
export JOBS=`nproc` && \
find /opt/py -mindepth 1 -print0 | xargs -n 1 -0 -P 1 bash -c '"${0}/bin/pip" install --no-cache-dir --root-user-action=ignore '\''oldest-supported-numpy; python_version < "3.9"'\'' '\''numpy; python_version >= "3.9"'\''' && \
echo "`date` numpy" >> /build/log.txt
# # Build psutil for Python versions not published on pypi
# RUN \
# echo "`date` psutil" >> /build/log.txt && \
# export JOBS=`nproc` && \
# git clone --depth=1 --single-branch -b release-`getver.py psutil` -c advice.detachedHead=false https://github.com/giampaolo/psutil.git && \
# cd psutil && \
# # Strip libraries before building any wheels \
# # strip --strip-unneeded -p -D /usr/local/lib{,64}/*.{so,a} && \
# find /usr/local \( -name '*.so' -o -name '*.a' \) -exec bash -c "strip -p -D --strip-unneeded {} -o /tmp/striped; if ! cmp {} /tmp/striped; then cp /tmp/striped {}; fi; rm -f /tmp/striped" \; && \
# if [ "$PYPY" = true ]; then \
# find /opt/py -mindepth 1 -print0 | xargs -n 1 -0 -P 1 bash -c '"${0}/bin/pip" wheel . --no-deps -w /io/wheelhouse && rm -rf build' && \
# true; \
# else \
# # only build for python 3.6 \
# # find /opt/py -mindepth 1 -name '*p36-*' -print0 | xargs -n 1 -0 -P 1 bash -c '"${0}/bin/pip" wheel . --no-deps -w /io/wheelhouse && rm -rf build' && \
# true; \
# fi && \
# if find /io/wheelhouse/ -name 'psutil*.whl' | grep .; then \
# find /io/wheelhouse/ -name 'psutil*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} auditwheel repair --only-plat --plat ${AUDITWHEEL_PLAT} -w /io/wheelhouse && \
# find /io/wheelhouse/ -name 'psutil*many*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} strip-nondeterminism -T "$SOURCE_DATE_EPOCH" -t zip -v && \
# find /io/wheelhouse/ -name 'psutil*many*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} advzip -k -z && \
# ls -l /io/wheelhouse && \
# true; \
# fi && \
# rm -rf ~/.cache && \
# echo "`date` psutil" >> /build/log.txt
RUN \
echo "`date` libzip" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py libzip` -c advice.detachedHead=false https://github.com/nih-at/libzip.git && \
cd libzip && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_EXAMPLES=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libzip" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` lcms2" >> /build/log.txt && \
export JOBS=`nproc` && \
export AUTOMAKE_JOBS=`nproc` && \
git clone --depth=1 --single-branch -b lcms`getver.py lcms2` -c advice.detachedHead=false https://github.com/mm2/Little-CMS.git && \
cd Little-CMS && \
./configure --silent --prefix=/usr/local --disable-static && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` lcms2" >> /build/log.txt
# Used by libtiff, gdal, mapnik, openslide, glymur
RUN \
echo "`date` openjpeg" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent https://github.com/uclouvain/openjpeg/archive/v`getver.py openjpeg`.tar.gz -L -o openjpeg.tar.gz && \
mkdir openjpeg && \
tar -zxf openjpeg.tar.gz -C openjpeg --strip-components 1 && \
rm -f openjpeg.tar.gz && \
cd openjpeg && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED=ON -DBUILD_STATIC=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` openjpeg" >> /build/log.txt
RUN \
echo "`date` libpng" >> /build/log.txt && \
export JOBS=`nproc` && \
export AUTOMAKE_JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py libpng` -c advice.detachedHead=false https://github.com/glennrp/libpng.git && \
cd libpng && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libpng" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` giflib" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent https://sourceforge.net/projects/giflib/files/giflib-`getver.py giflib`.tar.gz/download -L -o giflib.tar.gz && \
mkdir giflib && \
tar -zxf giflib.tar.gz -C giflib --strip-components 1 && \
rm -f giflib.tar.gz && \
cd giflib && \
sed -i 's/\$(MAKE) -C doc/echo/g' Makefile && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` giflib" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` zstd" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py zstd` -c advice.detachedHead=false https://github.com/facebook/zstd && \
cd zstd && \
mkdir _build && \
cd _build && \
cmake ../build/cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DZSTD_BUILD_STATIC=OFF -DZSTD_LZ4_SUPPORT=ON -DZSTD_LZMA_SUPPORT=ON -DZSTD_ZLIB_SUPPORT=ON -DZSTD_BUILD_PROGRAMS=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` zstd" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` jbigkit" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent https://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-`getver.py jbigkit`.tar.gz -L -o jbigkit.tar.gz && \
mkdir jbigkit && \
tar -zxf jbigkit.tar.gz -C jbigkit --strip-components 1 && \
rm -f jbigkit.tar.gz && \
cd jbigkit && \
python -c $'# \n\
path = "Makefile" \n\
s = open(path).read().replace("-O2 ", "-O2 -fPIC ") \n\
open(path, "w").write(s)' && \
make --silent -j ${JOBS} && \
cp {libjbig,pbmtools}/*.{o,so,a} /usr/local/lib/. || true && \
cp libjbig/*.h /usr/local/include/. && \
ldconfig && \
echo "`date` jbigkit" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` libwebp" >> /build/log.txt && \
export JOBS=`nproc` && \
curl --retry 5 --silent http://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-`getver.py libwebp`.tar.gz -L -o libwebp.tar.gz && \
mkdir libwebp && \
tar -zxf libwebp.tar.gz -C libwebp --strip-components 1 && \
rm -f libwebp.tar.gz && \
cd libwebp && \
# If we build with cmake, libvips throws an exception when we try to use \
# webp encoding. \
# mkdir _build && \
# cd _build && \
# cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel && \
./configure --silent --prefix=/usr/local --enable-libwebpmux --enable-libwebpdecoder --enable-libwebpextras --disable-static && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libwebp" >> /build/log.txt
# Used in gdal, mapnik, libvips, openslide, glymur, python-javabridge
RUN \
echo "`date` libjpeg-turbo" >> /build/log.txt && \
export JOBS=`nproc` && \
export CFLAGS="$CFLAGS -O3" && \
export CXXFLAGS="$CXXFLAGS -O3" && \
# Needed for 2.1.90 \
# export CFLAGS="-g0 -O2 -DNDEBUG -fPIC" && \
curl --retry 5 --silent https://github.com/libjpeg-turbo/libjpeg-turbo/archive/`getver.py libjpeg-turbo`.tar.gz -L -o libjpeg-turbo.tar.gz && \
mkdir libjpeg-turbo && \
tar -zxf libjpeg-turbo.tar.gz -C libjpeg-turbo --strip-components 1 && \
rm -f libjpeg-turbo.tar.gz && \
cd libjpeg-turbo && \
# build 8-bit \
mkdir _build8 && \
cd _build8 && \
cmake .. -DWITH_12BIT=0 -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD=${SOURCE_DATE_EPOCH} && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
cd .. && \
# build 12-bit in place \
cmake . -DWITH_12BIT=1 -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD=${SOURCE_DATE_EPOCH} && \
make clean && \
make --silent -j ${JOBS} && \
# don't install this; we reference it explicitly \
echo "`date` libjpeg-turbo" >> /build/log.txt
# Used in gdal, mapnik, libvips, openslide, glymur
RUN \
echo "`date` libdeflate" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py libdeflate` -c advice.detachedHead=false https://github.com/ebiggers/libdeflate.git && \
cd libdeflate && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libdeflate" >> /build/log.txt
# Used in gdal, mapnik, libvips, openslide, glymur. Image compression format
RUN \
echo "`date` lerc" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py lerc` -c advice.detachedHead=false https://github.com/Esri/lerc.git && \
cd lerc && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` lerc" >> /build/log.txt && \
cd /build && \
# \
# Used by libvips. SIMD/Vector functions \
# RUN \
echo "`date` libhwy" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b `getver.py libhwy` -c advice.detachedHead=false https://github.com/google/highway.git && \
cd highway && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_TESTING=OFF -DHWY_ENABLE_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS='-DVQSORT_SECURE_SEED=0' && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libhwy" >> /build/log.txt && \
cd /build && \
# \
# Used by gdal, mapnik, libvips. High dynamic range images \
# RUN \
echo "`date` openexr" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py openexr` -c advice.detachedHead=false https://github.com/AcademySoftwareFoundation/openexr.git && \
cd openexr && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_TESTING=OFF -DOPENEXR_BUILD_EXAMPLES=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` openexr" >> /build/log.txt && \
cd /build && \
# \
# Used by gdal, mapnik, libvips, openslide, javabridge. Lossless compression \
# RUN \
echo "`date` libbrotli" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py libbrotli` -c advice.detachedHead=false https://github.com/google/brotli.git && \
cd brotli && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_TESTING=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libbrotli" >> /build/log.txt && \
cd /build && \
# \
# Used by gdal, mapnik, vips \
# RUN \
echo "`date` jpeg-xl" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py jpeg-xl` -c advice.detachedHead=false --recurse-submodules -j ${JOBS} https://github.com/libjxl/libjxl.git && \
cd libjxl && \
find . -name '.git' -exec rm -rf {} \+ && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_TESTING=OFF -DCMAKE_CXX_FLAGS='-fpermissive' -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DHWY_ENABLE_INSTALL=OFF -DHWY_ENABLE_TESTS=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` jpeg-xl" >> /build/log.txt
# Used by mysql, gdal, mapnik, openslide, libtiff, glymur
# PINNED to work with MySQL and with libvips
RUN \
echo "`date` xz" >> /build/log.txt && \
export JOBS=`nproc` && \
## It'd be better to use the most recent \
if false; then \
git clone --depth=1 --single-branch -b v`getver.py xz` -c advice.detachedHead=false https://github.com/tukaani-project/xz.git && \
cd xz && \
mkdir _build && \
cd _build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF && \
true; else \
## But that breaks a bunch of packages \
# curl --retry 5 --silent https://downloads.sourceforge.net/project/lzmautils/xz-`getver.py xz`.tar.gz -L -o xz.tar.gz && \
curl --retry 5 --silent https://downloads.sourceforge.net/project/lzmautils/xz-5.2.6.tar.gz -L -o xz.tar.gz && \
mkdir xz && \
tar -zxf xz.tar.gz -C xz --strip-components 1 && \
rm -f xz.tar.gz && \
cd xz && \
./configure --silent --prefix=/usr/local --disable-static && \
true; fi && \
## This is in common \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` xz" >> /build/log.txt
RUN \
echo "`date` libtiff" >> /build/log.txt && \
export JOBS=`nproc` && \
export CFLAGS="$CFLAGS -O3" && \
export CXXFLAGS="$CXXFLAGS -O3" && \
git clone --depth=1 --single-branch -b v`getver.py libtiff` -c advice.detachedHead=false https://gitlab.com/libtiff/libtiff.git && \
cd libtiff && \
# We could use cmake here, but it seems to have a harder time sorting the \
# two libjpeg versions \
# mkdir _build && \
# cd _build && \
# cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel && \
# # -DJPEG_INCLUDE_DIR=/build/libjpeg-turbo -DJPEG_LIBRARY_RELEASE=/build/libjpeg-turbo/libjpeg.so && \
./autogen.sh || true && \
# for reasons I don't understand, configure changes $ORIGIN to RIGIN (or, \
# more generally, elides $O. Use a placeholder values and chrpath to fix \
# it afterwards \
export LDFLAGS="$LDFLAGS"',-rpath,OORIGIN' && \
./configure --prefix=/usr/local \
--disable-static \
--enable-jpeg12 \
--with-jpeg12-include-dir=/build/libjpeg-turbo \
--with-jpeg12-lib=/build/libjpeg-turbo/libjpeg.so \
| tee configure.output && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
chrpath -r '$ORIGIN' /usr/local/lib/libtiff.so && \
ldconfig && \
chrpath -l /usr/local/lib/libtiff.so && \
echo "`date` libtiff" >> /build/log.txt
# Rebuild openjpeg with our libtiff
RUN \
echo "`date` openjpeg again" >> /build/log.txt && \
export JOBS=`nproc` && \
cd openjpeg/_build && \
cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED=ON -DBUILD_STATIC=OFF && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` openjpeg again" >> /build/log.txt
RUN \
echo "`date` pylibtiff" >> /build/log.txt && \
export JOBS=`nproc` && \
pip install -U setuptools-scm && \
git clone --depth=1 --single-branch -b v`getver.py pylibtiff` -c advice.detachedHead=false https://github.com/pearu/pylibtiff.git && \
cd pylibtiff && \
mkdir libtiff/bin && \
find /build/libtiff/tools/.libs/ -executable -type f -exec cp {} libtiff/bin/. \; && \
strip libtiff/bin/* --strip-unneeded -p -D && \
python -c $'# \n\
path = "libtiff/bin/__init__.py" \n\
s = """import os \n\
import sys \n\
\n\
def program(): \n\
path = os.path.join(os.path.dirname(__file__), os.path.basename(sys.argv[0])) \n\
os.execv(path, sys.argv) \n\
""" \n\
open(path, "w").write(s)' && \
python -c $'# \n\
path = "setup.py" \n\
s = open(path).read().replace( \n\
"""\'console_scripts\': [""", \n\
"""\'console_scripts\': \n\
[\'%s=libtiff.bin:program\' % name for name in os.listdir(\'libtiff/bin\') if not name.endswith(\'.py\')] + [""") \n\
s = s.replace("name=\\"libtiff.tif_lzw\\",", \n\
"name=\\"libtiff.tif_lzw\\", libraries=[\'tiff\'],") \n\
# s = s.replace("python_requires=\'>=3.8\',", "") \n\
s = s.replace("packages=find_packages(),", \n\
"packages=find_packages(), package_data={\'libtiff\': [\'bin/*\']},") \n\
open(path, "w").write(s)' && \
python -c $'# \n\
path = "libtiff/libtiff_ctypes.py" \n\
s = open(path).read() \n\
s = s.replace( \n\
""" libtiff = None if lib is None else ctypes.cdll.LoadLibrary(lib)""", \n\
""" try: \n\
libtiff = None if lib is None else ctypes.cdll.LoadLibrary(lib) \n\
except Exception: \n\
lib = None \n\
if lib is None: \n\
libpath = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath( \n\
__file__)), ".libs")) \n\
if not os.path.exists(libpath): \n\
libpath = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(os.path.realpath( \n\
__file__))), "libtiff.libs")) \n\
if not os.path.exists(libpath): \n\
libpath = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(os.path.realpath( \n\
__file__))), "pylibtiff.libs")) \n\
libs = os.listdir(libpath) \n\
try: \n\
pospath = os.path.join(libpath, [lib for lib in libs if lib.startswith("libtiff-")][0]) \n\
if os.path.exists(pospath): \n\
lib = pospath \n\
except Exception: \n\
pass \n\
libtiff = None if lib is None else ctypes.cdll.LoadLibrary(lib)""") \n\
s = s.replace("""print("Not trying""", """# print("Not trying""") \n\
open(path, "w").write(s)' && \
sed -i 's/'\''oldest-supported-numpy'\''/'\''oldest-supported-numpy; python_version < "3.9"'\'', '\''numpy; python_version >= "3.9"'\''/g' pyproject.toml && \
# We need numpy present in the default python to check the header. \
# Ensure the correct header records. This will generate a missing header \
# companion file \
pip install numpy && \
(TIFF_HEADER_PATH=/build/libtiff/libtiff/tiff.h python libtiff/libtiff_ctypes.py || true) && \
pip uninstall -y numpy && \
# Increment version slightly \
git config --global user.email "you@example.com" && \
git config --global user.name "Your Name" && \
git commit -a --amend -m x && \
git tag `getver.py pylibtiff`.1 && \
# Strip libraries before building any wheels \
# strip --strip-unneeded -p -D /usr/local/lib{,64}/*.{so,a} && \
find /usr/local \( -name '*.so' -o -name '*.a' \) -exec bash -c "strip -p -D --strip-unneeded {} -o /tmp/striped; if ! cmp {} /tmp/striped; then cp /tmp/striped {}; fi; rm -f /tmp/striped" \; && \
for PYBIN in /opt/py/*/bin/; do \
rm -rf build || true && \
"${PYBIN}/python" -c 'import libtiff' || true && \
"${PYBIN}/pip" wheel --no-deps . -w /io/wheelhouse; \
done && \
find /io/wheelhouse/ -name '*libtiff*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} auditwheel repair --only-plat --plat ${AUDITWHEEL_PLAT} -w /io/wheelhouse && \
find /io/wheelhouse/ -name '*libtiff*many*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} strip-nondeterminism -T "$SOURCE_DATE_EPOCH" -t zip -v && \
find /io/wheelhouse/ -name '*libtiff*many*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} advzip -k -z && \
ls -l /io/wheelhouse && \
rm -rf ~/.cache && \
echo "`date` pylibtiff" >> /build/log.txt
RUN \
echo "`date` glymur" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py glymur` -c advice.detachedHead=false https://github.com/quintusdias/glymur.git && \
# git clone https://github.com/quintusdias/glymur.git && \
cd glymur && \
# version 0.9.3's commit \
# git checkout f4399d4e5e4fcb9e110e2af34515bcb08ff77053 && \
mkdir glymur/bin && \
# Copy some jpeg tools \
find /usr/local/bin -executable -type f -name 'opj_*' -exec cp {} glymur/bin/. \; && \
cp /build/libjpeg-turbo/_build8/{jpegtran,cjpeg,djpeg,rdjpgcom,wrjpgcom} glymur/bin/. && \
strip glymur/bin/* --strip-unneeded -p -D && \
python -c $'# \n\
path = "glymur/bin/__init__.py" \n\
s = """import os \n\
import sys \n\
\n\
def program(): \n\
path = os.path.join(os.path.dirname(__file__), os.path.basename(sys.argv[0])) \n\
os.execv(path, sys.argv) \n\
""" \n\
open(path, "w").write(s)' && \
python -c $'# \n\
path = "glymur/config.py" \n\
s = open(path).read() \n\
s = s.replace(" path = find_library(libname)", \n\
""" path = find_library(libname) \n\
libpath = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(os.path.realpath( \n\
__file__))), \'Glymur.libs\')) \n\
if os.path.exists(libpath): \n\
libs = os.listdir(libpath) \n\
try: \n\
pospath = os.path.join(libpath, [lib for lib in libs if "lib" + libname in lib][0]) \n\
if os.path.exists(pospath): \n\
path = pospath \n\
except Exception: \n\
pass""") \n\
open(path, "w").write(s)' && \
python -c $'# \n\
path = "glymur/version.py" \n\
s = open(path).read() \n\
s = s.replace(\'"0.12.9"\', \'"0.12.9.post1"\') \n\
open(path, "w").write(s)' && \
# Import a premade setup.py \
cp ../glymur.setup.py ./setup.py && rm -f setup.cfg && rm -f pyproject.toml && \
# Strip libraries before building any wheels \
# strip --strip-unneeded -p -D /usr/local/lib{,64}/*.{so,a} && \
find /usr/local \( -name '*.so' -o -name '*.a' \) -exec bash -c "strip -p -D --strip-unneeded {} -o /tmp/striped; if ! cmp {} /tmp/striped; then cp /tmp/striped {}; fi; rm -f /tmp/striped" \; && \
find /opt/py -mindepth 1 -not -name '*p36-*' -a -not -name '*p37-*' -print0 | xargs -n 1 -0 -P 1 bash -c '"${0}/bin/pip" wheel . --no-deps -w /io/wheelhouse && rm -rf build' && \
find /io/wheelhouse/ -name 'Glymur*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} auditwheel repair --only-plat --plat ${AUDITWHEEL_PLAT} -w /io/wheelhouse && \
find /io/wheelhouse/ -name 'Glymur*many*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} strip-nondeterminism -T "$SOURCE_DATE_EPOCH" -t zip -v && \
find /io/wheelhouse/ -name 'Glymur*many*.whl' -print0 | xargs -n 1 -0 -P ${JOBS} advzip -k -z && \
ls -l /io/wheelhouse && \
rm -rf ~/.cache && \
echo "`date` glymur" >> /build/log.txt
# Used by openslide and libvips
RUN \
echo "`date` libffi" >> /build/log.txt && \
export JOBS=`nproc` && \
export AUTOMAKE_JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py libffi` -c advice.detachedHead=false https://github.com/libffi/libffi.git && \
cd libffi && \
./autogen.sh && \
./configure --silent --prefix=/usr/local --disable-static --disable-docs && \
# make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` libffi" >> /build/log.txt
# Used by openslide and libvips
RUN \
echo "`date` util-linux" >> /build/log.txt && \
export JOBS=`nproc` && \
export AUTOMAKE_JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py util-linux` -c advice.detachedHead=false https://github.com/util-linux/util-linux.git && \
cd util-linux && \
sed -i 's/#ifndef UMOUNT_UNUSED/#ifndef O_PATH\n# define O_PATH 010000000\n#endif\n\n#ifndef UMOUNT_UNUSED/g' libmount/src/context_umount.c && \
./autogen.sh && \
./configure --disable-all-programs --enable-libblkid --enable-libmount --silent --prefix=/usr/local --disable-static && \
make --silent -j ${JOBS} && \
make --silent -j ${JOBS} install && \
ldconfig && \
echo "`date` util-linux" >> /build/log.txt
# Build tool
RUN \
echo "`date` meson" >> /build/log.txt && \
pip install --no-cache-dir meson && \
echo "`date` meson" >> /build/log.txt
# Used by openslide, libvips, and mapnik
RUN \
echo "`date` glib" >> /build/log.txt && \
export JOBS=`nproc` && \
pip install --no-cache-dir packaging && \
git clone --depth=1 --single-branch -b `getver.py glib` -c advice.detachedHead=false https://github.com/GNOME/glib.git && \
cd glib && \
meson setup --prefix=/usr/local --buildtype=release --optimization=3 -Dtests=False -Dglib_debug=disabled _build && \
cd _build && \
ninja -j ${JOBS} && \
ninja -j ${JOBS} install && \
ldconfig && \
echo "`date` glib" >> /build/log.txt
# Used by GDAL
RUN \
echo "`date` libtirpc" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b libtirpc-`getver.py libtirpc` -c advice.detachedHead=false https://github.com/alisw/libtirpc.git && \
cd libtirpc && \
. ./autogen.sh && \
./configure --prefix=/usr/local --disable-static && \
make -j ${JOBS} && \
make -j ${JOBS} install && \
ldconfig && \
echo "`date` libtirpc" >> /build/log.txt && \
cd /build && \
# \
# RUN \
echo "`date` libnsl" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b v`getver.py libnsl` -c advice.detachedHead=false https://github.com/thkukuk/libnsl.git && \
cd libnsl && \
./autogen.sh && \
./configure --prefix=/usr/local --disable-static && \
make -j ${JOBS} && \
make -j ${JOBS} install && \
ldconfig && \
echo "`date` libnsl" >> /build/log.txt
# Used by openslide and libvips
RUN \
echo "`date` gobject-introspection" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b `getver.py gobject-introspection` -c advice.detachedHead=false https://github.com/GNOME/gobject-introspection.git && \
cd gobject-introspection && \
python -c $'# \n\
path = "giscanner/meson.build" \n\
s = open(path).read() \n\
s = s[:s.index("install_subdir")] + s[s.index("flex"):] \n\
open(path, "w").write(s)' && \
sed -i 's/subdir('\''tests'\'')/#/g' meson.build && \
meson setup --prefix=/usr/local --buildtype=release --optimization=3 -Ddoctool=disabled -Dcairo=disabled _build && \
cd _build && \
ninja -j ${JOBS} && \
ninja -j ${JOBS} install && \
ldconfig && \
cd ../../glib && \
rm -rf _build && \
meson setup --prefix=/usr/local --buildtype=release --optimization=3 -Dtests=False -Dglib_debug=disabled -Dintrospection=enabled _build && \
cd _build && \
ninja -j ${JOBS} && \
ninja -j ${JOBS} install && \
ldconfig && \
echo "`date` gobject-introspection" >> /build/log.txt
# Used by openslide and libvips
RUN \
echo "`date` gdk-pixbuf" >> /build/log.txt && \
export JOBS=`nproc` && \
git clone --depth=1 --single-branch -b `getver.py gdk-pixbuf` -c advice.detachedHead=false https://github.com/GNOME/gdk-pixbuf.git && \
cd gdk-pixbuf && \
meson setup --prefix=/usr/local --buildtype=release --optimization=3 -Dbuiltin_loaders=all -Dman=False -Dinstalled_tests=False _build && \