@@ -10,14 +10,14 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}")
10
10
11
11
# Dependencies for compiling Python that we want to remove from
12
12
# the final image after compiling Python
13
- PYTHON_COMPILE_DEPS=" zlib-devel bzip2-devel expat-devel ncurses-devel readline-devel tk-devel gdbm-devel db4 -devel libpcap-devel xz-devel"
13
+ PYTHON_COMPILE_DEPS=" zlib-devel bzip2-devel expat-devel ncurses-devel readline-devel tk-devel gdbm-devel libdb -devel libpcap-devel xz-devel openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl -devel"
14
14
15
- # Libraries that are allowed as part of the manylinux2010 profile
16
- # Extract from PEP: https://www.python.org/dev/peps/pep-0571 /#the-manylinux2010 -policy
15
+ # Libraries that are allowed as part of the manylinux2014 profile
16
+ # Extract from PEP: https://www.python.org/dev/peps/pep-0599 /#the-manylinux2014 -policy
17
17
# On RPM-based systems, they are provided by these packages:
18
18
# Package: Libraries
19
19
# glib2: libglib-2.0.so.0, libgthread-2.0.so.0, libgobject-2.0.so.0
20
- # glibc: libresolv.so.2, libutil.so.1, libnsl.so.1, librt.so.1, libcrypt.so.1, libpthread.so.0, libdl.so.2, libm.so.6, libc.so.6
20
+ # glibc: libresolv.so.2, libutil.so.1, libnsl.so.1, librt.so.1, libpthread.so.0, libdl.so.2, libm.so.6, libc.so.6
21
21
# libICE: libICE.so.6
22
22
# libX11: libX11.so.6
23
23
# libXext: libXext.so.6
@@ -28,18 +28,17 @@ PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel expat-devel ncurses-devel readline-d
28
28
#
29
29
# PEP is missing the package for libSM.so.6 for RPM based system
30
30
# Install development packages (except for libgcc which is provided by gcc install)
31
- MANYLINUX2010_DEPS =" glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel"
31
+ MANYLINUX_DEPS =" glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel"
32
32
33
33
# Get build utilities
34
34
source $MY_DIR /build_utils.sh
35
35
36
- # Prerequisite for architecture
37
- case $AUDITWHEEL_ARCH in
38
- x86_64)
39
- # See https://unix.stackexchange.com/questions/41784/can-yum-express-a-preference-for-x86-64-over-i386-packages
40
- echo " multilib_policy=best" >> /etc/yum.conf
41
- ;;
42
- esac
36
+ # See https://unix.stackexchange.com/questions/41784/can-yum-express-a-preference-for-x86-64-over-i386-packages
37
+ echo " multilib_policy=best" >> /etc/yum.conf
38
+ # Error out if requested packages do not exist
39
+ echo " skip_missing_names_on_install=False" >> /etc/yum.conf
40
+ # Make sure that locale will not be removed
41
+ sed -i ' /^override_install_langs=/d' /etc/yum.conf
43
42
44
43
# https://hub.docker.com/_/centos/
45
44
# "Additionally, images with minor version tags that correspond to install
51
50
# Decided not to clean at this point: https://github.com/pypa/manylinux/pull/129
52
51
yum -y update
53
52
54
- # EPEL support (for cmake28 & yasm)
55
- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
56
-
57
- case $AUDITWHEEL_ARCH in
58
- x86_64)
59
- # Install devtoolset-8
60
- yum -y install centos-release-scl
61
- yum -y install \
62
- devtoolset-8-binutils \
63
- devtoolset-8-gcc \
64
- devtoolset-8-gcc-c++ \
65
- devtoolset-8-gcc-gfortran \
66
- ;;
67
- i686)
68
- # Install devtoolset-7 (binutils, gcc, gcc-c++, gcc-gfortran)
69
- devtoolset7s=(
70
- " devtoolset-7-runtime-7.1-4.el6.i686.rpm"
71
- " devtoolset-7-binutils-2.28-11.el6.i686.rpm"
72
- " devtoolset-7-gcc-7.3.1-5.10.el6.i686.rpm"
73
- " devtoolset-7-libstdc++-devel-7.3.1-5.10.el6.i686.rpm"
74
- " devtoolset-7-gcc-c++-7.3.1-5.10.el6.i686.rpm"
75
- " devtoolset-7-libquadmath-devel-7.3.1-5.10.el6.i686.rpm"
76
- " devtoolset-7-gcc-gfortran-7.3.1-5.10.el6.i686.rpm"
77
- )
78
- for rpm in " ${devtoolset7s[@]} " ; do
79
- yum install -y " https://www.repo.cloudlinux.com/cloudlinux/6.10/sclo/devtoolset-7/i386/$rpm "
80
- done
81
- ;;
82
- esac
53
+ # upgrading glibc-common can end with removal on en_US.UTF-8 locale
54
+ localedef -i en_US -f UTF-8 en_US.UTF-8
55
+
56
+ DEVTOOLSET8_TOOLCHAIN_DEPS=" devtoolset-8-binutils devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran"
57
+ DEFAULT_TOOLCHAIN_DEPS=" gcc gcc-c++ gcc-gfortran"
58
+ if [ " ${AUDITWHEEL_ARCH} " == " x86_64" ]; then
59
+ # Software collection (for devtoolset-8)
60
+ yum -y install centos-release-scl-rh
61
+ # EPEL support (for yasm)
62
+ yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
63
+ YASM=yasm
64
+ TOOLCHAIN_DEPS=${DEVTOOLSET8_TOOLCHAIN_DEPS}
65
+ elif [ " ${AUDITWHEEL_ARCH} " == " aarch64" ]; then
66
+ # Software collection (for devtoolset-8)
67
+ yum -y install centos-release-scl-rh
68
+ TOOLCHAIN_DEPS=${DEVTOOLSET8_TOOLCHAIN_DEPS}
69
+ elif [ " ${AUDITWHEEL_ARCH} " == " i686" ]; then
70
+ # No yasm, no devtoolset-8 on i686
71
+ TOOLCHAIN_DEPS=${DEFAULT_TOOLCHAIN_DEPS}
72
+ fi
83
73
84
74
# Development tools and libraries
85
75
yum -y install \
86
76
automake \
87
77
bison \
88
78
bzip2 \
89
- cmake28 \
79
+ ${TOOLCHAIN_DEPS} \
90
80
diffutils \
91
81
gettext \
92
82
file \
93
- kernel-devel- ` uname -r ` \
83
+ kernel-devel \
94
84
libffi-devel \
95
85
make \
96
86
patch \
97
87
unzip \
98
88
which \
99
- yasm \
89
+ ${YASM} \
100
90
${PYTHON_COMPILE_DEPS}
101
91
102
- # Install a git we link against system OpenSSL/Curl
103
- yum -y install openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel
92
+ # Install git
104
93
build_git $GIT_ROOT $GIT_HASH
105
94
git version
106
- yum -y erase openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel
107
-
108
- # Build an OpenSSL for Pythons. We'll delete this at the end.
109
- build_openssl $OPENSSL_ROOT $OPENSSL_HASH
110
95
111
96
# Install newest autoconf
112
97
build_autoconf $AUTOCONF_ROOT $AUTOCONF_HASH
@@ -155,8 +140,6 @@ ln -s $($PY37_BIN/python -c 'import certifi; print(certifi.where())') \
155
140
# Dockerfiles:
156
141
export SSL_CERT_FILE=/opt/_internal/certs.pem
157
142
158
- # Now we can delete our built OpenSSL headers/static libs since we've linked everything we need
159
- rm -rf /usr/local/ssl
160
143
161
144
# Install patchelf (latest with unreleased bug fixes)
162
145
curl -fsSL -o patchelf.tar.gz https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION .tar.gz
@@ -179,7 +162,7 @@ yum -y erase \
179
162
libX11 \
180
163
wireless-tools \
181
164
${PYTHON_COMPILE_DEPS} > /dev/null 2>&1
182
- yum -y install ${MANYLINUX2010_DEPS }
165
+ yum -y install ${MANYLINUX_DEPS }
183
166
yum -y clean all > /dev/null 2>&1
184
167
yum list installed
185
168
@@ -211,9 +194,11 @@ find /opt/_internal -depth \
211
194
# Fix libc headers to remain compatible with C99 compilers.
212
195
find /usr/include/ -type f -exec sed -i ' s/\bextern _*inline_*\b/extern __inline __attribute__ ((__gnu_inline__))/g' {} +
213
196
214
- # remove useless things that have been installed by devtoolset
215
- rm -rf $DEVTOOLSET_ROOTPATH /usr/share/man
216
- find $DEVTOOLSET_ROOTPATH /usr/share/locale -mindepth 1 -maxdepth 1 -not \( -name ' en*' -or -name ' locale.alias' \) | xargs rm -rf
197
+ if [ " ${DEVTOOLSET_ROOTPATH:- } " != " " ]; then
198
+ # remove useless things that have been installed by devtoolset
199
+ rm -rf $DEVTOOLSET_ROOTPATH /usr/share/man
200
+ find $DEVTOOLSET_ROOTPATH /usr/share/locale -mindepth 1 -maxdepth 1 -not \( -name ' en*' -or -name ' locale.alias' \) | xargs rm -rf
201
+ fi
217
202
rm -rf /usr/share/backgrounds
218
203
# if we updated glibc, we need to strip locales again...
219
204
localedef --list-archive | grep -v -i ^en_US.utf8 | xargs localedef --delete-from-archive
0 commit comments