Skip to content

Commit 507b7c5

Browse files
committed
manylinux2014
1 parent 9556325 commit 507b7c5

12 files changed

+21
-691
lines changed

.travis.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,9 @@ env:
2222

2323
jobs:
2424
include:
25-
- stage: "Patch glibc"
26-
env:
27-
- PLATFORM="x86_64"
28-
before_install:
29-
# Load cached docker images
30-
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
31-
script:
32-
- PLATFORM=$PLATFORM TRAVIS_COMMIT=$TRAVIS_COMMIT ./build.sh glibc_only
33-
before_cache:
34-
# Save tagged docker images
35-
- mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' | grep 'centos-with-vsyscall:latest' | xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
3625
- stage: "Build manylinux images"
3726
env:
3827
- PLATFORM="x86_64"
39-
before_install:
40-
# Load cached docker images
41-
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
4228
script:
4329
- PLATFORM=$PLATFORM TRAVIS_COMMIT=$TRAVIS_COMMIT ./build.sh
4430
deploy:

build.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,4 @@
44
set -ex
55

66

7-
if [ $PLATFORM == x86_64 ] || [ "$1" == "glibc_only" ]; then
8-
# Output something every 10 minutes or Travis kills the job
9-
while sleep 9m; do echo -n -e " \b"; done &
10-
docker build --rm -t centos-with-vsyscall:latest --cache-from centos-with-vsyscall:latest --target centos-with-vsyscall -f docker/glibc/Dockerfile docker/glibc/
11-
# Killing background sleep loop
12-
kill %1
13-
if [ "$1" == "glibc_only" ]; then
14-
exit 0
15-
fi
16-
docker build --rm -t quay.io/pypa/manylinux2010_centos-6-no-vsyscall --cache-from quay.io/pypa/manylinux2010_centos-6-no-vsyscall:latest --cache-from centos-with-vsyscall:latest -f docker/glibc/Dockerfile docker/glibc/
17-
fi
18-
19-
docker build --rm -t quay.io/pypa/manylinux2010_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/
7+
docker build --rm -t quay.io/pypa/manylinux2014_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/

docker/Dockerfile-x86_64

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# See docker/glibc/
2-
FROM quay.io/pypa/manylinux2010_centos-6-no-vsyscall
1+
FROM centos:7
32
LABEL maintainer="The ManyLinux project"
43

5-
ENV AUDITWHEEL_PLAT manylinux2010_x86_64
4+
ENV AUDITWHEEL_PLAT manylinux2014_x86_64
65
ENV LC_ALL en_US.UTF-8
76
ENV LANG en_US.UTF-8
87
ENV LANGUAGE en_US.UTF-8

docker/build_scripts/build.sh

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}")
1010

1111
# Dependencies for compiling Python that we want to remove from
1212
# 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 db4-devel libpcap-devel xz-devel openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel"
1414

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
1717
# On RPM-based systems, they are provided by these packages:
1818
# Package: Libraries
1919
# 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
2121
# libICE: libICE.so.6
2222
# libX11: libX11.so.6
2323
# libXext: libXext.so.6
@@ -46,15 +46,14 @@ echo "multilib_policy=best" >> /etc/yum.conf
4646
# Decided not to clean at this point: https://github.com/pypa/manylinux/pull/129
4747
yum -y update
4848

49-
# Software collection (for devtoolset-8) and EPEL support (for cmake28 & yasm)
50-
yum -y install centos-release-scl https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
49+
# Software collection (for devtoolset-8) and EPEL support (for yasm)
50+
yum -y install centos-release-scl https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
5151

5252
# Development tools and libraries
5353
yum -y install \
5454
automake \
5555
bison \
5656
bzip2 \
57-
cmake28 \
5857
devtoolset-8-binutils \
5958
devtoolset-8-gcc \
6059
devtoolset-8-gcc-c++ \
@@ -71,14 +70,9 @@ yum -y install \
7170
yasm \
7271
${PYTHON_COMPILE_DEPS}
7372

74-
# Install a git we link against system OpenSSL/Curl
75-
yum -y install openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel
73+
# Install git
7674
build_git $GIT_ROOT $GIT_HASH
7775
git version
78-
yum -y erase openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel perl-devel
79-
80-
# Build an OpenSSL for Pythons. We'll delete this at the end.
81-
build_openssl $OPENSSL_ROOT $OPENSSL_HASH
8276

8377
# Install newest autoconf
8478
build_autoconf $AUTOCONF_ROOT $AUTOCONF_HASH
@@ -127,8 +121,6 @@ ln -s $($PY36_BIN/python -c 'import certifi; print(certifi.where())') \
127121
# Dockerfiles:
128122
export SSL_CERT_FILE=/opt/_internal/certs.pem
129123

130-
# Now we can delete our built OpenSSL headers/static libs since we've linked everything we need
131-
rm -rf /usr/local/ssl
132124

133125
# Install patchelf (latest with unreleased bug fixes)
134126
curl -fsSL -o patchelf.tar.gz https://github.com/NixOS/patchelf/archive/$PATCHELF_VERSION.tar.gz

docker/build_scripts/build_env.sh

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
# source me
22

33
PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python
4-
CPYTHON_VERSIONS="2.7.16 3.4.10 3.5.7 3.6.9 3.7.4"
5-
6-
# openssl version to build, with expected sha256 hash of .tar.gz
7-
# archive.
8-
OPENSSL_ROOT=openssl-1.0.2t
9-
OPENSSL_HASH=14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
10-
OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source
4+
CPYTHON_VERSIONS="3.5.7 3.6.9 3.7.4"
115

126
PATCHELF_VERSION=0.10
137
PATCHELF_HASH=b3cb6bdedcef5607ce34a350cf0b182eb979f8f7bc31eae55a93a70a3f020d13
@@ -24,16 +18,16 @@ LIBTOOL_ROOT=libtool-2.4.6
2418
LIBTOOL_HASH=e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3
2519
LIBTOOL_DOWNLOAD_URL=http://ftp.gnu.org/gnu/libtool
2620

27-
SQLITE_AUTOCONF_VERSION=sqlite-autoconf-3270200
28-
SQLITE_AUTOCONF_HASH=50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e
21+
SQLITE_AUTOCONF_VERSION=sqlite-autoconf-3290000
22+
SQLITE_AUTOCONF_HASH=8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b
2923
SQLITE_AUTOCONF_DOWNLOAD_URL=https://www.sqlite.org/2019
3024

31-
LIBXCRYPT_VERSION=4.4.6
25+
LIBXCRYPT_VERSION=4.4.10
3226
LIBXCRYPT_DOWNLOAD_URL=https://codeload.github.com/besser82/libxcrypt/tar.gz
33-
LIBXCRYPT_HASH=4c33b80d3e1363c218ec6132bae0ea9eae181af9f9892939e90ec44b246ebe23
27+
LIBXCRYPT_HASH=7da15438d93883be434b0b44a8c22f726b5f605c6d88a315e17d4f4e929c20a8
3428

35-
GIT_ROOT=2.21.0
36-
GIT_HASH=7a601275abcc6ff51cc79a6d402e83c90ae37d743b0b8d073aa009dd4b22d432
29+
GIT_ROOT=2.23.0
30+
GIT_HASH=7d84f5d6f48e95b467a04a8aa1d474e0d21abc7877998af945568d2634fea46a
3731
GIT_DOWNLOAD_URL=https://github.com/git/git/archive
3832

3933
GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py

docker/build_scripts/build_utils.sh

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,18 @@ function pyver_dist_dir {
3131
function do_cpython_build {
3232
local py_ver=$1
3333
check_var $py_ver
34-
local ucs_setting=$2
35-
check_var $ucs_setting
3634
tar -xzf Python-$py_ver.tgz
3735
pushd Python-$py_ver
38-
if [ "$ucs_setting" = "none" ]; then
39-
unicode_flags=""
40-
dir_suffix=""
41-
else
42-
local unicode_flags="--enable-unicode=$ucs_setting"
43-
local dir_suffix="-$ucs_setting"
44-
fi
45-
local prefix="/opt/_internal/cpython-${py_ver}${dir_suffix}"
36+
local prefix="/opt/_internal/cpython-${py_ver}"
4637
mkdir -p ${prefix}/lib
47-
./configure --prefix=${prefix} --disable-shared $unicode_flags > /dev/null
38+
./configure --prefix=${prefix} --disable-shared > /dev/null
4839
make -j2 > /dev/null
4940
make install > /dev/null
5041
popd
5142
rm -rf Python-$py_ver
5243
# Some python's install as bin/python3. Make them available as
5344
# bin/python.
54-
if [ -e ${prefix}/bin/python3 ]; then
45+
if [ -e ${prefix}/bin/python3 ] && [ ! -e ${prefix}/bin/python ]; then
5546
ln -s python3 ${prefix}/bin/python
5647
fi
5748
${prefix}/bin/python get-pip.py
@@ -74,12 +65,7 @@ function build_cpython {
7465
curl -fsSLO $PYTHON_DOWNLOAD_URL/$py_dist_dir/Python-$py_ver.tgz
7566
curl -fsSLO $PYTHON_DOWNLOAD_URL/$py_dist_dir/Python-$py_ver.tgz.asc
7667
gpg --verify Python-$py_ver.tgz.asc
77-
if [ $(lex_pyver $py_ver) -lt $(lex_pyver 3.3) ]; then
78-
do_cpython_build $py_ver ucs2
79-
do_cpython_build $py_ver ucs4
80-
else
81-
do_cpython_build $py_ver none
82-
fi
68+
do_cpython_build $py_ver
8369
rm -f Python-$py_ver.tgz
8470
rm -f Python-$py_ver.tgz.asc
8571
}
@@ -100,13 +86,6 @@ function build_cpythons {
10086
}
10187

10288

103-
function do_openssl_build {
104-
./config no-ssl2 no-shared -fPIC --prefix=/usr/local/ssl > /dev/null
105-
make > /dev/null
106-
make install_sw > /dev/null
107-
}
108-
109-
11089
function fetch_source {
11190
# This is called both inside and outside the build context (e.g. in Travis) to prefetch
11291
# source tarballs, where curl exists (and works)
@@ -134,19 +113,6 @@ function check_sha256sum {
134113
}
135114

136115

137-
function build_openssl {
138-
local openssl_fname=$1
139-
check_var ${openssl_fname}
140-
local openssl_sha256=$2
141-
check_var ${openssl_sha256}
142-
fetch_source ${openssl_fname}.tar.gz ${OPENSSL_DOWNLOAD_URL}
143-
check_sha256sum ${openssl_fname}.tar.gz ${openssl_sha256}
144-
tar -xzf ${openssl_fname}.tar.gz
145-
(cd ${openssl_fname} && do_openssl_build)
146-
rm -rf ${openssl_fname} ${openssl_fname}.tar.gz
147-
}
148-
149-
150116
function build_git {
151117
local git_fname=$1
152118
check_var ${git_fname}

docker/glibc/Dockerfile

Lines changed: 0 additions & 27 deletions
This file was deleted.

docker/glibc/README.rst

Lines changed: 0 additions & 79 deletions
This file was deleted.

docker/glibc/build_scripts/CentOS-source.repo

Lines changed: 0 additions & 7 deletions
This file was deleted.

docker/glibc/build_scripts/glibc.spec.patch

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)