@@ -55,16 +55,30 @@ rpm -Uvh --replacepkgs epel-release-5*.rpm
5555rm -f epel-release-5* .rpm
5656
5757# 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 \
6070 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 \
6477 ${PYTHON_COMPILE_DEPS}
6578
6679# Build an OpenSSL for both curl and the Pythons. We'll delete this at the end.
6780build_openssl $OPENSSL_ROOT $OPENSSL_HASH
81+
6882# Install curl so we can have TLS 1.2 in this ancient container.
6983build_curl $CURL_ROOT $CURL_HASH
7084hash -r
@@ -92,8 +106,7 @@ curl -fsSLO https://sqlite.org/2017/$SQLITE_AUTOCONF_VERSION.tar.gz
92106check_sha256sum $SQLITE_AUTOCONF_VERSION .tar.gz $SQLITE_AUTOCONF_HASH
93107tar xfz $SQLITE_AUTOCONF_VERSION .tar.gz
94108cd $SQLITE_AUTOCONF_VERSION
95- ./configure
96- make install
109+ do_standard_install
97110cd ..
98111rm -rf $SQLITE_AUTOCONF_VERSION *
99112
@@ -126,26 +139,34 @@ rm -rf /usr/local/ssl
126139curl -fsSL -o patchelf.tar.gz https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION .tar.gz
127140check_sha256sum patchelf.tar.gz $PATCHELF_HASH
128141tar -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 )
130143rm -rf patchelf.tar.gz patchelf-$PATCHELF_VERSION
131144
132145ln -s $PY36_BIN /auditwheel /usr/local/bin/auditwheel
133146
134147# Clean up development headers and other unnecessary stuff for
135148# 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 \
139157 ${PYTHON_COMPILE_DEPS} > /dev/null 2>&1
140158yum -y install ${MANYLINUX1_DEPS}
141159yum -y clean all > /dev/null 2>&1
142160yum list installed
161+
143162# we don't need libpython*.a, and they're many megabytes
144163find /opt/_internal -name ' *.a' -print0 | xargs -0 rm -f
164+
145165# Strip what we can -- and ignore errors, because this just attempts to strip
146166# *everything*, including non-ELF files:
147167find /opt/_internal -type f -print0 \
148168 | xargs -0 -n1 strip --strip-unneeded 2> /dev/null || true
169+
149170# We do not need the Python test suites, or indeed the precompiled .pyc and
150171# .pyo files. Partially cribbed from:
151172# https://github.com/docker-library/python/blob/master/3.4/slim/Dockerfile
0 commit comments