@@ -55,16 +55,30 @@ rpm -Uvh --replacepkgs epel-release-5*.rpm
55
55
rm -f epel-release-5* .rpm
56
56
57
57
# Development tools and libraries
58
- yum -y install bzip2 make patch unzip bison yasm diffutils \
59
- automake which file cmake28 \
58
+ yum -y install \
59
+ automake \
60
+ bison \
61
+ bzip2 \
62
+ cmake28 \
63
+ devtoolset-2-binutils \
64
+ devtoolset-2-gcc \
65
+ devtoolset-2-gcc-c++ \
66
+ devtoolset-2-gcc-gfortran \
67
+ diffutils \
68
+ expat-devel \
69
+ gettext \
60
70
kernel-devel-` uname -r` \
61
- expat-devel gettext \
62
- devtoolset-2-binutils devtoolset-2-gcc \
63
- devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran \
71
+ file \
72
+ make \
73
+ patch \
74
+ unzip \
75
+ which \
76
+ yasm \
64
77
${PYTHON_COMPILE_DEPS}
65
78
66
79
# Build an OpenSSL for both curl and the Pythons. We'll delete this at the end.
67
80
build_openssl $OPENSSL_ROOT $OPENSSL_HASH
81
+
68
82
# Install curl so we can have TLS 1.2 in this ancient container.
69
83
build_curl $CURL_ROOT $CURL_HASH
70
84
hash -r
@@ -92,8 +106,7 @@ curl -fsSLO https://sqlite.org/2017/$SQLITE_AUTOCONF_VERSION.tar.gz
92
106
check_sha256sum $SQLITE_AUTOCONF_VERSION .tar.gz $SQLITE_AUTOCONF_HASH
93
107
tar xfz $SQLITE_AUTOCONF_VERSION .tar.gz
94
108
cd $SQLITE_AUTOCONF_VERSION
95
- ./configure
96
- make install
109
+ do_standard_install
97
110
cd ..
98
111
rm -rf $SQLITE_AUTOCONF_VERSION *
99
112
@@ -126,26 +139,34 @@ rm -rf /usr/local/ssl
126
139
curl -fsSL -o patchelf.tar.gz https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION .tar.gz
127
140
check_sha256sum patchelf.tar.gz $PATCHELF_HASH
128
141
tar -xzf patchelf.tar.gz
129
- (cd patchelf-$PATCHELF_VERSION && ./bootstrap.sh && ./configure && make && make install )
142
+ (cd patchelf-$PATCHELF_VERSION && ./bootstrap.sh && do_standard_install )
130
143
rm -rf patchelf.tar.gz patchelf-$PATCHELF_VERSION
131
144
132
145
ln -s $PY36_BIN /auditwheel /usr/local/bin/auditwheel
133
146
134
147
# Clean up development headers and other unnecessary stuff for
135
148
# final image
136
- yum -y erase wireless-tools gtk2 libX11 hicolor-icon-theme \
137
- avahi freetype bitstream-vera-fonts \
138
- expat-devel gettext \
149
+ yum -y erase \
150
+ avahi \
151
+ bitstream-vera-fonts \
152
+ freetype \
153
+ gtk2 \
154
+ hicolor-icon-theme \
155
+ libX11 \
156
+ wireless-tools \
139
157
${PYTHON_COMPILE_DEPS} > /dev/null 2>&1
140
158
yum -y install ${MANYLINUX1_DEPS}
141
159
yum -y clean all > /dev/null 2>&1
142
160
yum list installed
161
+
143
162
# we don't need libpython*.a, and they're many megabytes
144
163
find /opt/_internal -name ' *.a' -print0 | xargs -0 rm -f
164
+
145
165
# Strip what we can -- and ignore errors, because this just attempts to strip
146
166
# *everything*, including non-ELF files:
147
167
find /opt/_internal -type f -print0 \
148
168
| xargs -0 -n1 strip --strip-unneeded 2> /dev/null || true
169
+
149
170
# We do not need the Python test suites, or indeed the precompiled .pyc and
150
171
# .pyo files. Partially cribbed from:
151
172
# https://github.com/docker-library/python/blob/master/3.4/slim/Dockerfile
0 commit comments