File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,17 @@ RUN export CMAKE_VERSION=3.18.3 && \
78
78
manylinux-entrypoint /build_scripts/build-cmake.sh
79
79
80
80
81
+ FROM build_base AS build_swig
82
+ COPY build_scripts/build-swig.sh /build_scripts/
83
+ RUN export SWIG_ROOT=swig-4.0.2 && \
84
+ export SWIG_HASH=d53be9730d8d58a16bf0cbd1f8ac0c0c3e1090573168bfa151b01eb47fa906fc && \
85
+ export SWIG_DOWNLOAD_URL=https://sourceforge.net/projects/swig/files/swig/${SWIG_ROOT} && \
86
+ export PCRE_ROOT=pcre-8.44 && \
87
+ export PCRE_HASH=aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728 && \
88
+ export PCRE_DOWNLOAD_URL=https://ftp.pcre.org/pub/pcre && \
89
+ manylinux-entrypoint /build_scripts/build-swig.sh
90
+
91
+
81
92
FROM build_base AS build_cpython
82
93
COPY build_scripts/build-sqlite3.sh /build_scripts/
83
94
RUN export SQLITE_AUTOCONF_ROOT=sqlite-autoconf-3340000 && \
@@ -130,6 +141,7 @@ RUN hardlink -cv /opt/_internal
130
141
FROM runtime_base
131
142
COPY --from=build_git /manylinux-rootfs /
132
143
COPY --from=build_cmake /manylinux-rootfs /
144
+ COPY --from=build_swig /manylinux-rootfs /
133
145
COPY --from=build_cpython /manylinux-rootfs /
134
146
COPY --from=all_cpython /opt/_internal /opt/_internal/
135
147
COPY build_scripts/finalize.sh /build_scripts/finalize.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Top-level build script called from Dockerfile
3
+
4
+ # Stop at any error, show all commands
5
+ set -exuo pipefail
6
+
7
+ # Get script directory
8
+ MY_DIR=$( dirname " ${BASH_SOURCE[0]} " )
9
+
10
+ # Get build utilities
11
+ source $MY_DIR /build_utils.sh
12
+
13
+ # Install newest swig
14
+ check_var ${SWIG_ROOT}
15
+ check_var ${SWIG_HASH}
16
+ check_var ${SWIG_DOWNLOAD_URL}
17
+ check_var ${PCRE_ROOT}
18
+ check_var ${PCRE_HASH}
19
+ check_var ${PCRE_DOWNLOAD_URL}
20
+
21
+ fetch_source ${SWIG_ROOT} .tar.gz ${SWIG_DOWNLOAD_URL}
22
+ check_sha256sum ${SWIG_ROOT} .tar.gz ${SWIG_HASH}
23
+ tar -xzf ${SWIG_ROOT} .tar.gz
24
+ pushd ${SWIG_ROOT}
25
+ fetch_source ${PCRE_ROOT} .tar.gz ${PCRE_DOWNLOAD_URL}
26
+ check_sha256sum ${PCRE_ROOT} .tar.gz ${PCRE_HASH}
27
+ ./Tools/pcre-build.sh
28
+ ./configure
29
+ make -j$( nproc)
30
+ make install DESTDIR=/manylinux-rootfs
31
+ popd
32
+ rm -rf ${SWIG_ROOT} *
33
+
34
+ # Strip what we can
35
+ strip_ /manylinux-rootfs
36
+
37
+ # Install
38
+ cp -rf /manylinux-rootfs/* /
39
+
40
+ swig -version
You can’t perform that action at this time.
0 commit comments