File tree Expand file tree Collapse file tree 5 files changed +45
-23
lines changed Expand file tree Collapse file tree 5 files changed +45
-23
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,26 @@ COPY build_scripts/build.sh /build_scripts/
63
63
COPY build_scripts/build_env.sh /build_scripts/
64
64
RUN manylinux-entrypoint bash build_scripts/build.sh
65
65
66
+
67
+ FROM build_base AS build_git
68
+ COPY build_scripts/build-git.sh /build_scripts/
69
+ RUN export GIT_ROOT=git-2.30.0 && \
70
+ export GIT_HASH=d24c4fa2a658318c2e66e25ab67cc30038a35696d2d39e6b12ceccf024de1e5e && \
71
+ export GIT_DOWNLOAD_URL=https://www.kernel.org/pub/software/scm/git && \
72
+ manylinux-entrypoint /build_scripts/build-git.sh
73
+
74
+
66
75
FROM build_base AS build_cmake
67
- COPY build_scripts/build-cmake.sh /build_scripts/build-cmake.sh
76
+ COPY build_scripts/build-cmake.sh /build_scripts/
68
77
RUN export CMAKE_VERSION=3.18.3 && \
69
78
export CMAKE_HASH=2c89f4e30af4914fd6fb5d00f863629812ada848eee4e2d29ec7e456d7fa32e5 && \
70
79
export CMAKE_DOWNLOAD_URL=https://github.com/Kitware/CMake/releases/download && \
71
80
manylinux-entrypoint /build_scripts/build-cmake.sh
72
81
82
+
73
83
FROM runtime_base
74
84
COPY --from=build_base /manylinux-rootfs /
85
+ COPY --from=build_git /manylinux-rootfs /
75
86
COPY --from=build_cmake /manylinux-rootfs /
76
87
COPY --from=build_base /opt/_internal /opt/_internal/
77
88
COPY build_scripts/build_utils.sh /build_scripts/build_utils.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 libtool
14
+ check_var ${GIT_ROOT}
15
+ check_var ${GIT_HASH}
16
+ check_var ${GIT_DOWNLOAD_URL}
17
+
18
+ fetch_source ${GIT_ROOT} .tar.gz ${GIT_DOWNLOAD_URL}
19
+ check_sha256sum ${GIT_ROOT} .tar.gz ${GIT_HASH}
20
+ tar -xzf ${GIT_ROOT} .tar.gz
21
+ pushd ${GIT_ROOT}
22
+ make -j$( nproc) install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs
23
+ popd
24
+ rm -rf ${GIT_ROOT} ${GIT_ROOT} .tar.gz
25
+
26
+
27
+ # Strip what we can
28
+ strip_ /manylinux-rootfs
29
+
30
+ # Install
31
+ cp -rf /manylinux-rootfs/* /
32
+
33
+ git version
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ CMAKE_DEPS="openssl-devel zlib-devel libcurl-devel"
19
19
# Development tools and libraries
20
20
yum -y install ${PYTHON_COMPILE_DEPS} ${CMAKE_DEPS}
21
21
22
- # Install git
23
- build_git $GIT_ROOT $GIT_HASH
24
- /manylinux-rootfs/usr/local/bin/git version
25
-
26
22
# Install a more recent SQLite3
27
23
curl -fsSLO $SQLITE_AUTOCONF_DOWNLOAD_URL /$SQLITE_AUTOCONF_ROOT .tar.gz
28
24
check_sha256sum $SQLITE_AUTOCONF_ROOT .tar.gz $SQLITE_AUTOCONF_HASH
Original file line number Diff line number Diff line change @@ -7,7 +7,3 @@ CPYTHON_VERSIONS="3.5.10 3.6.12 3.7.9 3.8.7 3.9.1"
7
7
SQLITE_AUTOCONF_ROOT=sqlite-autoconf-3340000
8
8
SQLITE_AUTOCONF_HASH=bf6db7fae37d51754737747aaaf413b4d6b3b5fbacd52bdb2d0d6e5b2edd9aee
9
9
SQLITE_AUTOCONF_DOWNLOAD_URL=https://www.sqlite.org/2020
10
-
11
- GIT_ROOT=git-2.30.0
12
- GIT_HASH=d24c4fa2a658318c2e66e25ab67cc30038a35696d2d39e6b12ceccf024de1e5e
13
- GIT_DOWNLOAD_URL=https://www.kernel.org/pub/software/scm/git
Original file line number Diff line number Diff line change @@ -98,20 +98,6 @@ function check_sha256sum {
98
98
}
99
99
100
100
101
- function build_git {
102
- local git_fname=$1
103
- check_var ${git_fname}
104
- local git_sha256=$2
105
- check_var ${git_sha256}
106
- check_var ${GIT_DOWNLOAD_URL}
107
- fetch_source ${git_fname} .tar.gz ${GIT_DOWNLOAD_URL}
108
- check_sha256sum ${git_fname} .tar.gz ${git_sha256}
109
- tar -xzf ${git_fname} .tar.gz
110
- (cd ${git_fname} && make -j$( nproc) install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs > /dev/null)
111
- rm -rf ${git_fname} ${git_fname} .tar.gz
112
- }
113
-
114
-
115
101
function do_standard_install {
116
102
./configure " $@ " > /dev/null
117
103
make -j$( nproc) > /dev/null
You can’t perform that action at this time.
0 commit comments