Skip to content

Commit a94593e

Browse files
committed
Add manylinux_2_24 images
1 parent 80f9c6c commit a94593e

File tree

7 files changed

+110
-63
lines changed

7 files changed

+110
-63
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
platform: "x86_64"
3333
- policy: "manylinux2014"
3434
platform: "ppc64le"
35+
- policy: "manylinux_2_24"
36+
platform: "i686"
37+
- policy: "manylinux_2_24"
38+
platform: "x86_64"
39+
- policy: "manylinux_2_24"
40+
platform: "ppc64le"
3541

3642
env:
3743
POLICY: ${{ matrix.policy }}

.travis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,18 @@ jobs:
2626
virt: vm
2727
group: edge
2828
env: POLICY="manylinux2014" PLATFORM="aarch64"
29+
- arch: s390x
30+
env: POLICY="manylinux2014" PLATFORM="s390x"
2931
#- arch: ppc64le
3032
# env: POLICY="manylinux2014" PLATFORM="ppc64le"
33+
- arch: arm64-graviton2
34+
virt: vm
35+
group: edge
36+
env: POLICY="manylinux_2_24" PLATFORM="aarch64"
3137
- arch: s390x
32-
env: POLICY="manylinux2014" PLATFORM="s390x"
38+
env: POLICY="manylinux_2_24" PLATFORM="s390x"
39+
#- arch: ppc64le
40+
# env: POLICY="manylinux2014" PLATFORM="ppc64le"
3341

3442
before_install:
3543
- if [ -d "${HOME}/buildx-cache/.buildx-cache-${POLICY}_${PLATFORM}" ]; then cp -rlf ${HOME}/buildx-cache/.buildx-cache-${POLICY}_${PLATFORM} ./; fi

README.rst

Lines changed: 50 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ Archives: https://mail.python.org/mailman/listinfo/wheel-builders
88
Older archives: https://groups.google.com/forum/#!forum/manylinux-discuss
99

1010
The goal of the manylinux project is to provide a convenient way to
11-
distribute binary Python extensions as wheels on Linux. This effort
12-
has produced `PEP 513 <https://www.python.org/dev/peps/pep-0513/>`_ which
13-
is further enhanced by `PEP 571 <https://www.python.org/dev/peps/pep-0571/>`_
14-
and now `PEP 599 <https://www.python.org/dev/peps/pep-0599/>`_ defining
15-
``manylinux2014_*`` platform tags.
11+
distribute binary Python extensions as wheels on Linux.
12+
This effort has produced `PEP 513 <https://www.python.org/dev/peps/pep-0513/>`_ (manylinux1),
13+
`PEP 571 <https://www.python.org/dev/peps/pep-0571/>`_ (manylinux2010),
14+
`PEP 599 <https://www.python.org/dev/peps/pep-0599/>`_ (manylinux2014) and
15+
`PEP 600 <https://www.python.org/dev/peps/pep-0600/>`_ (manylinux_x_y).
1616

1717
PEP 513 defined ``manylinux1_x86_64`` and ``manylinux1_i686`` platform tags
1818
and the wheels were built on Centos5. Centos5 reached End of Life (EOL) on
19-
March 31st, 2017 and thus PEP 571 was proposed.
19+
March 31st, 2017.
2020

2121
PEP 571 defined ``manylinux2010_x86_64`` and ``manylinux2010_i686`` platform
22-
tags and the wheels were built on Centos6. Centos6 will reach End of Life (EOL)
22+
tags and the wheels were built on Centos6. Centos6 reached End of Life (EOL)
2323
on November 30th, 2020.
2424

2525
PEP 599 defines the following platform tags:
@@ -41,8 +41,10 @@ PEP 599 defines the following platform tags:
4141
Wheels are built on CentOS 7 which will reach End of Life (EOL)
4242
on June 30th, 2024.
4343

44-
Code and details regarding ``manylinux1`` can be found here:
45-
`manylinux1 <https://github.com/pypa/manylinux/tree/manylinux1>`_.
44+
PEP 600 has been designed to be "future-proof" and does not enforce specific symbols and a specific distro to build.
45+
It only states that a wheel tagged ``manylinux_x_y`` shall work on any distro based on ``glibc>=x.y``.
46+
The manylinux project supports ``manylinux_2_24`` images for ``x86_64``, ``i686``, ``aarch64``, ``ppc64le`` and ``s390x``.
47+
4648

4749
Wheel packages compliant with those tags can be uploaded to
4850
`PyPI <https://pypi.python.org>`_ (for instance with `twine
@@ -52,14 +54,16 @@ pip:
5254
+-------------------+----------------------------------+
5355
| ``manylinux`` tag | Client-side pip version required |
5456
+===================+==================================+
57+
| ``manylinux_x_y`` | pip >= 20.3 |
58+
+-------------------+----------------------------------+
5559
| ``manylinux2014`` | pip >= 19.3 |
5660
+-------------------+----------------------------------+
5761
| ``manylinux2010`` | pip >= 19.0 |
5862
+-------------------+----------------------------------+
5963
| ``manylinux1`` | pip >= 8.1.0 |
6064
+-------------------+----------------------------------+
6165

62-
The manylinux2014 tags allow projects to distribute wheels that are
66+
The various manylinux tags allow projects to distribute wheels that are
6367
automatically installed (and work!) on the vast majority of desktop
6468
and server Linux distributions.
6569

@@ -73,74 +77,63 @@ Building manylinux-compatible wheels is not trivial; as a general
7377
rule, binaries built on one Linux distro will only work on other Linux
7478
distros that are the same age or newer. Therefore, if we want to make
7579
binaries that run on most Linux distros, we have to use an old enough
76-
distro -- CentOS 7.
80+
distro.
7781

7882

79-
Rather than forcing you to install CentOS 7 yourself, install Python,
83+
Rather than forcing you to install an old distro yourself, install Python,
8084
etc., we provide `Docker <https://docker.com/>`_ images where we've
8185
done the work for you. The images are uploaded to `quay.io`_ and are tagged
8286
for repeatable builds.
8387

84-
manylinux1 (CentOS 5 based)
85-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
86-
87-
x86-64 image: ``quay.io/pypa/manylinux1_x86_64``
88-
89-
.. image:: https://quay.io/repository/pypa/manylinux1_x86_64/status
90-
:target: https://quay.io/repository/pypa/manylinux1_x86_64
9188

92-
i686 image: ``quay.io/pypa/manylinux1_i686``
93-
94-
.. image:: https://quay.io/repository/pypa/manylinux1_i686/status
95-
:target: https://quay.io/repository/pypa/manylinux1_i686
96-
97-
manylinux2010 (CentOS 6 based)
98-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89+
manylinux_2_24 (Debian 9 based)
90+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9991

100-
x86-64 image: ``quay.io/pypa/manylinux2010_x86_64``
92+
- x86_64 image: ``quay.io/pypa/manylinux_2_24_x86_64``
93+
- i686 image: ``quay.io/pypa/manylinux_2_24_i686``
94+
- aarch64 image: ``quay.io/pypa/manylinux_2_24_aarch64``
95+
- ppc64le image: ``quay.io/pypa/manylinux_2_24_ppc64le``
96+
- s390x image: ``quay.io/pypa/manylinux_2_24_s390x``
10197

102-
.. image:: https://quay.io/repository/pypa/manylinux2010_x86_64/status
103-
:target: https://quay.io/repository/pypa/manylinux2010_x86_64
104-
105-
i686 image: ``quay.io/pypa/manylinux2010_i686``
106-
107-
.. image:: https://quay.io/repository/pypa/manylinux2010_i686/status
108-
:target: https://quay.io/repository/pypa/manylinux2010_i686
10998

11099
manylinux2014 (CentOS 7 based)
111100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112101

113-
x86_64 image: ``quay.io/pypa/manylinux2014_x86_64``
102+
- x86_64 image: ``quay.io/pypa/manylinux2014_x86_64``
103+
- i686 image: ``quay.io/pypa/manylinux2014_i686``
104+
- aarch64 image: ``quay.io/pypa/manylinux2014_aarch64``
105+
- ppc64le image: ``quay.io/pypa/manylinux2014_ppc64le``
106+
- s390x image: ``quay.io/pypa/manylinux2014_s390x``
114107

115-
.. image:: https://quay.io/repository/pypa/manylinux2014_x86_64/status
116-
:target: https://quay.io/repository/pypa/manylinux2014_x86_64
117108

118-
i686 image: ``quay.io/pypa/manylinux2014_i686``
109+
manylinux2010 (CentOS 6 based - EOL)
110+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119111

120-
.. image:: https://quay.io/repository/pypa/manylinux2014_i686/status
121-
:target: https://quay.io/repository/pypa/manylinux2014_i686
112+
- x86-64 image: ``quay.io/pypa/manylinux2010_x86_64``
113+
- i686 image: ``quay.io/pypa/manylinux2010_i686``
122114

123-
aarch64 image: ``quay.io/pypa/manylinux2014_aarch64``
124115

125-
.. image:: https://quay.io/repository/pypa/manylinux2014_aarch64/status
126-
:target: https://quay.io/repository/pypa/manylinux2014_aarch64
116+
manylinux1 (CentOS 5 based - EOL)
117+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127118

128-
ppc64le image: ``quay.io/pypa/manylinux2014_ppc64le``
119+
Code and details regarding ``manylinux1`` can be found in the `manylinux1 branch <https://github.com/pypa/manylinux/tree/manylinux1>`_.
129120

130-
.. image:: https://quay.io/repository/pypa/manylinux2014_ppc64le/status
131-
:target: https://quay.io/repository/pypa/manylinux2014_ppc64le
121+
Support for ``manylinux1`` will `end on January 1st, 2022 <https://github.com/pypa/manylinux/issues/994>`_.
132122

133-
s390x image: ``quay.io/pypa/manylinux2014_s390x``
123+
- x86-64 image: ``quay.io/pypa/manylinux1_x86_64``
124+
- i686 image: ``quay.io/pypa/manylinux1_i686``
134125

135-
.. image:: https://quay.io/repository/pypa/manylinux2014_s390x/status
136-
:target: https://quay.io/repository/pypa/manylinux2014_s390x
137126

138-
These images are rebuilt using GitHub Actions on every commit to this
127+
All images are rebuilt using GitHub Actions / Travis-CI on every commit to this
139128
repository; see the
140129
`docker/ <https://github.com/pypa/manylinux/tree/master/docker>`_
141130
directory for source code.
142131

143-
The images currently contain:
132+
133+
Image content
134+
~~~~~~~~~~~~~
135+
136+
All images currently contain:
144137

145138
- CPython 3.5, 3.6, 3.7, 3.8 and 3.9, installed in
146139
``/opt/python/<python tag>-<abi tag>``. The directories are named
@@ -149,8 +142,7 @@ The images currently contain:
149142
can be used to produce wheels named like
150143
``<pkg>-<version>-cp37-cp37m-<arch>.whl``.
151144

152-
- Devel packages for all the libraries that PEP 571/599 allows you to
153-
assume are present on the host system
145+
- Development packages for all the libraries that PEP 571/599 list. One should not assume the presence of any other development package.
154146

155147
- The `auditwheel <https://pypi.python.org/pypi/auditwheel>`_ tool
156148

@@ -170,6 +162,8 @@ current (root) directory:
170162

171163
$ PLATFORM=$(uname -m) POLICY=manylinux2014 COMMIT_SHA=latest ./build.sh
172164

165+
Please not that the Docker build is using `buildx <https://github.com/docker/buildx>`_.
166+
173167
Example
174168
-------
175169

@@ -205,6 +199,9 @@ reached EOL was discussed in `PEP 571 <https://www.python.org/dev/peps/pep-0571/
205199
The proposal to upgrade ``manylinux2010`` to ``manylinux2014`` was
206200
discussed in `PEP 599 <https://www.python.org/dev/peps/pep-0599/>`_.
207201

202+
The proposal for a "future-proof" ``manylinux_x_y`` definition was
203+
discussed in `PEP 600 <https://www.python.org/dev/peps/pep-0600/>`_.
204+
208205
This repo also has some analysis code that was used when putting
209206
together the original proposal in the ``policy-info/`` directory.
210207

build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ elif [ "${POLICY}" == "manylinux2014" ]; then
5353
else
5454
LD_LIBRARY_PATH_ARG="${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
5555
fi
56+
elif [ "${POLICY}" == "manylinux_2_24" ]; then
57+
BASEIMAGE="${MULTIARCH_PREFIX}debian:9"
58+
DEVTOOLSET_ROOTPATH=
59+
PREPEND_PATH=
60+
LD_LIBRARY_PATH_ARG=
5661
else
5762
echo "Unsupported policy: '${POLICY}'"
5863
exit 1

docker/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# default to latest supported policy, x86_64
2-
ARG BASEIMAGE=amd64/centos:7
3-
ARG POLICY=manylinux2014
2+
ARG BASEIMAGE=amd64/debian:9
3+
ARG POLICY=manylinux_2_24
44
ARG PLATFORM=x86_64
5-
ARG DEVTOOLSET_ROOTPATH=/opt/rh/devtoolset-9/root
6-
ARG LD_LIBRARY_PATH_ARG=${DEVTOOLSET_ROOTPATH}/usr/lib64:${DEVTOOLSET_ROOTPATH}/usr/lib:${DEVTOOLSET_ROOTPATH}/usr/lib64/dyninst:${DEVTOOLSET_ROOTPATH}/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib
7-
ARG PREPEND_PATH=${DEVTOOLSET_ROOTPATH}/usr/bin:
5+
ARG DEVTOOLSET_ROOTPATH=
6+
ARG LD_LIBRARY_PATH_ARG=
7+
ARG PREPEND_PATH=
88

99
FROM $BASEIMAGE AS runtime_base
1010
ARG POLICY

docker/build_scripts/install-build-packages.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" ==
1616
else
1717
COMPILE_DEPS="${COMPILE_DEPS} libdb-devel"
1818
fi
19+
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
20+
PACKAGE_MANAGER=apt
21+
COMPILE_DEPS="libz-dev libbz2-dev libexpat1-dev libncurses5-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev liblzma-dev openssl libssl-dev libkeyutils-dev libkrb5-dev comerr-dev libidn2-0-dev libcurl4-openssl-dev uuid-dev libffi-dev linux-kernel-headers"
1922
else
2023
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'"
2124
exit 1
2225
fi
2326

2427

25-
if [ ${PACKAGE_MANAGER} == yum ]; then
28+
if [ "${PACKAGE_MANAGER}" == "yum" ]; then
2629
yum -y install ${COMPILE_DEPS}
2730
yum clean all
2831
rm -rf /var/cache/yum
32+
elif [ "${PACKAGE_MANAGER}" == "apt" ]; then
33+
export DEBIAN_FRONTEND=noninteractive
34+
apt-get update -qq
35+
apt-get install -qq -y --no-install-recommends ${COMPILE_DEPS}
36+
apt-get clean -qq
37+
rm -rf /var/lib/apt/lists/*
2938
else
3039
echo "Not implemented"
3140
exit 1

docker/build_scripts/install-runtime-packages.sh

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}")
2626
# MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install)
2727
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
2828
MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel"
29+
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
30+
MANYLINUX_DEPS="libc6-dev libstdc++-6-dev libglib2.0-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libice-dev libsm-dev"
2931
else
3032
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'"
3133
exit 1
@@ -39,6 +41,8 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" ==
3941
else
4042
RUNTIME_DEPS="${RUNTIME_DEPS} libdb"
4143
fi
44+
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
45+
RUNTIME_DEPS="zlib1g libbz2-1.0 libexpat1 libncurses5 libreadline7 tk libgdbm3 libdb5.3 libpcap0.8 liblzma5 libssl1.1 libkeyutils1 libkrb5-3 libcomerr2 libidn2-0 libcurl3 uuid libffi6"
4246
else
4347
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'"
4448
exit 1
@@ -91,14 +95,22 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
9195
# Install mayeut/devtoolset-9 repo to get devtoolset-9
9296
curl -fsSLo /etc/yum.repos.d/mayeut-devtoolset-9.repo https://copr.fedorainfracloud.org/coprs/mayeut/devtoolset-9/repo/custom-1/mayeut-devtoolset-9-custom-1.repo
9397
fi
98+
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
99+
PACKAGE_MANAGER=apt
100+
export DEBIAN_FRONTEND=noninteractive
101+
sed -i 's/none/en_US/g' /etc/apt/apt.conf.d/docker-no-languages
102+
apt-get update -qq
103+
apt-get upgrade -qq -y
104+
apt-get install -qq -y --no-install-recommends ca-certificates gpg curl locales
105+
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
94106
else
95107
echo "Unsupported policy: '${AUDITWHEEL_POLICY}'"
96108
exit 1
97109
fi
98110

99111
if ! which localedef &> /dev/null; then
100112
# somebody messed up glibc-common package to squeeze image size, reinstall the package
101-
if [ ${PACKAGE_MANAGER} == yum ]; then
113+
if [ "${PACKAGE_MANAGER}" == "yum" ]; then
102114
yum -y reinstall glibc-common
103115
else
104116
echo "Not implemented"
@@ -109,10 +121,14 @@ fi
109121
# upgrading glibc-common can end with removal on en_US.UTF-8 locale
110122
localedef -i en_US -f UTF-8 en_US.UTF-8
111123

112-
if [ ${PACKAGE_MANAGER} == yum ]; then
124+
if [ "${PACKAGE_MANAGER}" == "yum" ]; then
113125
yum -y install ${BASETOOLS} ${TOOLCHAIN_DEPS} ${MANYLINUX_DEPS} ${RUNTIME_DEPS}
114126
yum clean all
115127
rm -rf /var/cache/yum
128+
elif [ "${PACKAGE_MANAGER}" == "apt" ]; then
129+
apt-get install -qq -y --no-install-recommends ${BASETOOLS} ${TOOLCHAIN_DEPS} ${MANYLINUX_DEPS} ${RUNTIME_DEPS}
130+
apt-get clean -qq
131+
rm -rf /var/lib/apt/lists/*
116132
else
117133
echo "Not implemented"
118134
exit 1
@@ -128,7 +144,9 @@ if [ "${DEVTOOLSET_ROOTPATH:-}" != "" ]; then
128144
find $DEVTOOLSET_ROOTPATH/usr/share/locale -mindepth 1 -maxdepth 1 -not \( -name 'en*' -or -name 'locale.alias' \) | xargs rm -rf
129145
fi
130146

131-
rm -rf /usr/share/backgrounds
147+
if [ -d /usr/share/backgrounds ]; then
148+
rm -rf /usr/share/backgrounds
149+
fi
132150

133151
# if we updated glibc, we need to strip locales again...
134152
if localedef --list-archive | grep -sq -v -i ^en_US.utf8; then
@@ -137,6 +155,10 @@ fi
137155
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
138156
mv -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
139157
build-locale-archive
158+
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
159+
rm /usr/lib/locale/locale-archive
160+
localedef -i en_US -f UTF-8 en_US.UTF-8
161+
update-locale LANG=en_US.UTF-8
140162
fi
141163

142164
find /usr/share/locale -mindepth 1 -maxdepth 1 -not \( -name 'en*' -or -name 'locale.alias' \) | xargs rm -rf

0 commit comments

Comments
 (0)