CINXE.COM

PEP 599 – The manylinux2014 Platform Tag | peps.python.org

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="color-scheme" content="light dark"> <title>PEP 599 – The manylinux2014 Platform Tag | peps.python.org</title> <link rel="shortcut icon" href="../_static/py.png"> <link rel="canonical" href="https://peps.python.org/pep-0599/"> <link rel="stylesheet" href="../_static/style.css" type="text/css"> <link rel="stylesheet" href="../_static/mq.css" type="text/css"> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" media="(prefers-color-scheme: light)" id="pyg-light"> <link rel="stylesheet" href="../_static/pygments_dark.css" type="text/css" media="(prefers-color-scheme: dark)" id="pyg-dark"> <link rel="alternate" type="application/rss+xml" title="Latest PEPs" href="https://peps.python.org/peps.rss"> <meta property="og:title" content='PEP 599 – The manylinux2014 Platform Tag | peps.python.org'> <meta property="og:description" content="This PEP proposes the creation of a manylinux2014 platform tag to succeed the manylinux2010 tag introduced by PEP 513. It also proposes that PyPI and pip both be updated to support uploading, downloading, and installing manylinux2014 distributions on co..."> <meta property="og:type" content="website"> <meta property="og:url" content="https://peps.python.org/pep-0599/"> <meta property="og:site_name" content="Python Enhancement Proposals (PEPs)"> <meta property="og:image" content="https://peps.python.org/_static/og-image.png"> <meta property="og:image:alt" content="Python PEPs"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> <meta name="description" content="This PEP proposes the creation of a manylinux2014 platform tag to succeed the manylinux2010 tag introduced by PEP 513. It also proposes that PyPI and pip both be updated to support uploading, downloading, and installing manylinux2014 distributions on co..."> <meta name="theme-color" content="#3776ab"> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-sun-half" viewBox="0 0 24 24" pointer-events="all"> <title>Following system colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="9"></circle> <path d="M12 3v18m0-12l4.65-4.65M12 14.3l7.37-7.37M12 19.6l8.85-8.85"></path> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24" pointer-events="all"> <title>Selected dark colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"></path> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24" pointer-events="all"> <title>Selected light colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> </svg> <script> document.documentElement.dataset.colour_scheme = localStorage.getItem("colour_scheme") || "auto" </script> <section id="pep-page-section"> <header> <h1>Python Enhancement Proposals</h1> <ul class="breadcrumbs"> <li><a href="https://www.python.org/" title="The Python Programming Language">Python</a> &raquo; </li> <li><a href="../pep-0000/">PEP Index</a> &raquo; </li> <li>PEP 599</li> </ul> <button id="colour-scheme-cycler" onClick="setColourScheme(nextColourScheme())"> <svg aria-hidden="true" class="colour-scheme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-light"><use href="#svg-sun"></use></svg> <span class="visually-hidden">Toggle light / dark / auto colour theme</span> </button> </header> <article> <section id="pep-content"> <h1 class="page-title">PEP 599 – The manylinux2014 Platform Tag</h1> <dl class="rfc2822 field-list simple"> <dt class="field-odd">Author<span class="colon">:</span></dt> <dd class="field-odd">Dustin Ingram &lt;di&#32;&#97;t&#32;python.org&gt;</dd> <dt class="field-even">Sponsor<span class="colon">:</span></dt> <dd class="field-even">Paul Moore &lt;p.f.moore&#32;&#97;t&#32;gmail.com&gt;</dd> <dt class="field-odd">BDFL-Delegate<span class="colon">:</span></dt> <dd class="field-odd">Paul Moore &lt;p.f.moore&#32;&#97;t&#32;gmail.com&gt;</dd> <dt class="field-even">Discussions-To<span class="colon">:</span></dt> <dd class="field-even"><a class="reference external" href="https://discuss.python.org/t/the-next-manylinux-specification/1043">Discourse thread</a></dd> <dt class="field-odd">Status<span class="colon">:</span></dt> <dd class="field-odd"><abbr title="Replaced by another succeeding PEP">Superseded</abbr></dd> <dt class="field-even">Type<span class="colon">:</span></dt> <dd class="field-even"><abbr title="Non-normative PEP containing background, guidelines or other information relevant to the Python ecosystem">Informational</abbr></dd> <dt class="field-odd">Topic<span class="colon">:</span></dt> <dd class="field-odd"><a class="reference external" href="../topic/packaging/">Packaging</a></dd> <dt class="field-even">Created<span class="colon">:</span></dt> <dd class="field-even">29-Apr-2019</dd> <dt class="field-odd">Post-History<span class="colon">:</span></dt> <dd class="field-odd">29-Apr-2019</dd> <dt class="field-even">Superseded-By<span class="colon">:</span></dt> <dd class="field-even"><a class="reference external" href="../pep-0600/">600</a></dd> <dt class="field-odd">Resolution<span class="colon">:</span></dt> <dd class="field-odd"><a class="reference external" href="https://discuss.python.org/t/the-next-manylinux-specification/1043/199">Discourse message</a></dd> </dl> <hr class="docutils" /> <section id="contents"> <details><summary>Table of Contents</summary><ul class="simple"> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#rationale">Rationale</a></li> <li><a class="reference internal" href="#the-manylinux2014-policy">The <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> policy</a></li> <li><a class="reference internal" href="#compilation-of-compliant-wheels">Compilation of Compliant Wheels</a><ul> <li><a class="reference internal" href="#docker-images">Docker Images</a></li> <li><a class="reference internal" href="#auditwheel">Auditwheel</a></li> </ul> </li> <li><a class="reference internal" href="#platform-detection-for-installers">Platform Detection for Installers</a></li> <li><a class="reference internal" href="#backwards-compatibility-with-manylinux2010-wheels">Backwards compatibility with <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> wheels</a></li> <li><a class="reference internal" href="#pypi-support">PyPI Support</a></li> <li><a class="reference internal" href="#references">References</a></li> <li><a class="reference internal" href="#acceptance">Acceptance</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> </details></section> <section id="abstract"> <h2><a class="toc-backref" href="#abstract" role="doc-backlink">Abstract</a></h2> <p>This PEP proposes the creation of a <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> platform tag to succeed the <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> tag introduced by <a class="pep reference internal" href="../pep-0513/" title="PEP 513 – A Platform Tag for Portable Linux Built Distributions">PEP 513</a>. It also proposes that PyPI and <code class="docutils literal notranslate"><span class="pre">pip</span></code> both be updated to support uploading, downloading, and installing <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> distributions on compatible platforms.</p> </section> <section id="rationale"> <h2><a class="toc-backref" href="#rationale" role="doc-backlink">Rationale</a></h2> <p>CentOS 6 is now the oldest supported CentOS release, and will receive maintenance updates through November 30th, 2020, <a class="footnote-reference brackets" href="#id8" id="id1">[1]</a> at which point it will reach end-of-life, and no further updates such as security patches will be made available. All wheels built under the <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> images will remain at obsolete versions after that point.</p> <p>Therefore, we propose the continuation of the existing manylinux standard, and that a new <a class="pep reference internal" href="../pep-0425/" title="PEP 425 – Compatibility Tags for Built Distributions">PEP 425</a>-style platform tag called <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> be derived from CentOS 7 and that the <code class="docutils literal notranslate"><span class="pre">manylinux</span></code> toolchain, PyPI, and <code class="docutils literal notranslate"><span class="pre">pip</span></code> be updated to support it.</p> <p>Similar to how <a class="pep reference internal" href="../pep-0571/" title="PEP 571 – The manylinux2010 Platform Tag">PEP 571</a> and <a class="pep reference internal" href="../pep-0513/" title="PEP 513 – A Platform Tag for Portable Linux Built Distributions">PEP 513</a> drew allowed shared libraries and their symbol versions from CentOS 5.11 and CentOS 6, respectively, a <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> platform tag will draw its libraries and symbol versions from CentOS 7, which will reach end-of-life on June 30th, 2024. <a class="footnote-reference brackets" href="#id8" id="id2">[1]</a></p> <p>The <code class="docutils literal notranslate"><span class="pre">manylinuxYYYY</span></code> pattern has a number of advantages that motivate continuing with the current status quo:</p> <ul class="simple"> <li>Well-defined Docker images with clearly specified compatible libraries;</li> <li>No need to survey for compatibility issues across multiple releases;</li> <li>A single build image and <code class="docutils literal notranslate"><span class="pre">auditwheel</span></code> profile per architecture.</li> </ul> <p>There are also some disadvantages:</p> <ul class="simple"> <li>Requires drafting a new PEP for every new standard;</li> <li>Requires adding the new platform tag to installers (e.g., <code class="docutils literal notranslate"><span class="pre">pip</span></code>);</li> <li>Installers are unable to install a platform tag which predates a given release.</li> </ul> <p>There are also challenges which would exist for any proposal, including the time and effort it takes to define, prepare and release the Docker images and corresponding <code class="docutils literal notranslate"><span class="pre">auditwheel</span></code> profiles. These challenges were experienced in the long rollout period for <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code>, which took approximately 1 year from PEP acceptance to compatible build environment published. <a class="footnote-reference brackets" href="#id9" id="id3">[3]</a></p> <p>However, if this PEP can be an indicator, the process is now well-defined and easily repeatable, which should increase the timeline for rollout of a newer, updated platform tag.</p> </section> <section id="the-manylinux2014-policy"> <h2><a class="toc-backref" href="#the-manylinux2014-policy" role="doc-backlink">The <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> policy</a></h2> <p>The following criteria determine a <code class="docutils literal notranslate"><span class="pre">linux</span></code> wheel’s eligibility for the <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> tag:</p> <ol class="arabic"> <li>The wheel may only contain binary executables and shared objects compiled for one of the following architectures supported by CentOS 7, or a CentOS 7 compatible base image (such as ubi7): <a class="footnote-reference brackets" href="#id10" id="id4">[4]</a><div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">x86_64</span> <span class="n">i686</span> <span class="n">aarch64</span> <span class="n">armv7l</span> <span class="n">ppc64</span> <span class="n">ppc64le</span> <span class="n">s390x</span> </pre></div> </div> <p>This list adds support for ARMv7 (armv7l), ARMv8 (aarch64) and PowerPC (ppc64, ppc64le) architectures supported by the CentOS Alternative Architecture Special Interest Group, as well as the IBM Z (s390x) architecture. <a class="footnote-reference brackets" href="#id11" id="id5">[5]</a></p> </li> <li>The wheel’s binary executables or shared objects may not link against externally-provided libraries except those in the following list:<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">libgcc_s</span><span class="o">.</span><span class="n">so</span><span class="mf">.1</span> <span class="n">libstdc</span><span class="o">++.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libm</span><span class="o">.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libdl</span><span class="o">.</span><span class="n">so</span><span class="mf">.2</span> <span class="n">librt</span><span class="o">.</span><span class="n">so</span><span class="mf">.1</span> <span class="n">libc</span><span class="o">.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libnsl</span><span class="o">.</span><span class="n">so</span><span class="mf">.1</span> <span class="n">libutil</span><span class="o">.</span><span class="n">so</span><span class="mf">.1</span> <span class="n">libpthread</span><span class="o">.</span><span class="n">so</span><span class="mf">.0</span> <span class="n">libresolv</span><span class="o">.</span><span class="n">so</span><span class="mf">.2</span> <span class="n">libX11</span><span class="o">.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libXext</span><span class="o">.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libXrender</span><span class="o">.</span><span class="n">so</span><span class="mf">.1</span> <span class="n">libICE</span><span class="o">.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libSM</span><span class="o">.</span><span class="n">so</span><span class="mf">.6</span> <span class="n">libGL</span><span class="o">.</span><span class="n">so</span><span class="mf">.1</span> <span class="n">libgobject</span><span class="o">-</span><span class="mf">2.0</span><span class="o">.</span><span class="n">so</span><span class="mf">.0</span> <span class="n">libgthread</span><span class="o">-</span><span class="mf">2.0</span><span class="o">.</span><span class="n">so</span><span class="mf">.0</span> <span class="n">libglib</span><span class="o">-</span><span class="mf">2.0</span><span class="o">.</span><span class="n">so</span><span class="mf">.0</span> </pre></div> </div> <p>This list is identical to the externally-provided libraries originally allowed for <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code>, with one exception: <code class="docutils literal notranslate"><span class="pre">libcrypt.so.1</span></code> was removed due to being deprecated in Fedora 30. <code class="docutils literal notranslate"><span class="pre">libpythonX.Y</span></code> remains ineligible for inclusion for the same reasons outlined in <a class="pep reference internal" href="../pep-0513/" title="PEP 513 – A Platform Tag for Portable Linux Built Distributions">PEP 513</a>.</p> <p>On Debian-based systems, these libraries are provided by the packages:</p> <table class="docutils align-default"> <thead> <tr class="row-odd"><th class="head">Package</th> <th class="head">Libraries</th> </tr> </thead> <tbody> <tr class="row-even"><td>libc6</td> <td>libdl.so.2, libresolv.so.2, librt.so.1, libc.so.6, libpthread.so.0, libm.so.6, libutil.so.1, libnsl.so.1</td> </tr> <tr class="row-odd"><td>libgcc1</td> <td>libgcc_s.so.1</td> </tr> <tr class="row-even"><td>libgl1</td> <td>libGL.so.1</td> </tr> <tr class="row-odd"><td>libglib2.0-0</td> <td>libgobject-2.0.so.0, libgthread-2.0.so.0, libglib-2.0.so.0</td> </tr> <tr class="row-even"><td>libice6</td> <td>libICE.so.6</td> </tr> <tr class="row-odd"><td>libsm6</td> <td>libSM.so.6</td> </tr> <tr class="row-even"><td>libstdc++6</td> <td>libstdc++.so.6</td> </tr> <tr class="row-odd"><td>libx11-6</td> <td>libX11.so.6</td> </tr> <tr class="row-even"><td>libxext6</td> <td>libXext.so.6</td> </tr> <tr class="row-odd"><td>libxrender1</td> <td>libXrender.so.1</td> </tr> </tbody> </table> <p>On RPM-based systems, they are provided by these packages:</p> <table class="docutils align-default"> <thead> <tr class="row-odd"><th class="head">Package</th> <th class="head">Libraries</th> </tr> </thead> <tbody> <tr class="row-even"><td>glib2</td> <td>libglib-2.0.so.0, libgthread-2.0.so.0, libgobject-2.0.so.0</td> </tr> <tr class="row-odd"><td>glibc</td> <td>libresolv.so.2, libutil.so.1, libnsl.so.1, librt.so.1, libpthread.so.0, libdl.so.2, libm.so.6, libc.so.6</td> </tr> <tr class="row-even"><td>libICE</td> <td>libICE.so.6</td> </tr> <tr class="row-odd"><td>libX11</td> <td>libX11.so.6</td> </tr> <tr class="row-even"><td>libXext:</td> <td>libXext.so.6</td> </tr> <tr class="row-odd"><td>libXrender</td> <td>libXrender.so.1</td> </tr> <tr class="row-even"><td>libgcc:</td> <td>libgcc_s.so.1</td> </tr> <tr class="row-odd"><td>libstdc++</td> <td>libstdc++.so.6</td> </tr> <tr class="row-even"><td>mesa</td> <td>libGL.so.1</td> </tr> </tbody> </table> </li> <li>If the wheel contains binary executables or shared objects linked against any allowed libraries that also export versioned symbols, they may only depend on the following maximum versions:<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">GLIBC_2</span><span class="mf">.17</span> <span class="n">CXXABI_1</span><span class="mf">.3.7</span><span class="p">,</span> <span class="n">CXXABI_TM_1</span> <span class="ow">is</span> <span class="n">also</span> <span class="n">allowed</span> <span class="n">GLIBCXX_3</span><span class="mf">.4.19</span> <span class="n">GCC_4</span><span class="mf">.8.0</span> </pre></div> </div> <p>As an example, <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels may include binary artifacts that require <code class="docutils literal notranslate"><span class="pre">glibc</span></code> symbols at version <code class="docutils literal notranslate"><span class="pre">GLIBC_2.12</span></code>, because this an earlier version than the maximum of <code class="docutils literal notranslate"><span class="pre">GLIBC_2.17</span></code>.</p> </li> <li>If a wheel is built for any version of CPython 2 or CPython versions 3.0 up to and including 3.2, it <em>must</em> include a CPython ABI tag indicating its Unicode ABI. A <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheel built against Python 2, then, must include either the <code class="docutils literal notranslate"><span class="pre">cpy27mu</span></code> tag indicating it was built against an interpreter with the UCS-4 ABI or the <code class="docutils literal notranslate"><span class="pre">cpy27m</span></code> tag indicating an interpreter with the UCS-2 ABI. (<a class="pep reference internal" href="../pep-3149/" title="PEP 3149 – ABI version tagged .so files">PEP 3149</a> <a class="footnote-reference brackets" href="#id12" id="id6">[7]</a>)</li> <li>A wheel <em>must not</em> require the <code class="docutils literal notranslate"><span class="pre">PyFPE_jbuf</span></code> symbol. This is achieved by building it against a Python compiled <em>without</em> the <code class="docutils literal notranslate"><span class="pre">--with-fpectl</span></code> <code class="docutils literal notranslate"><span class="pre">configure</span></code> flag.</li> </ol> </section> <section id="compilation-of-compliant-wheels"> <h2><a class="toc-backref" href="#compilation-of-compliant-wheels" role="doc-backlink">Compilation of Compliant Wheels</a></h2> <p>Like <code class="docutils literal notranslate"><span class="pre">manylinux1</span></code>, the <code class="docutils literal notranslate"><span class="pre">auditwheel</span></code> tool adds <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> platform tags to <code class="docutils literal notranslate"><span class="pre">linux</span></code> wheels built by <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">wheel</span></code> or <code class="docutils literal notranslate"><span class="pre">bdist_wheel</span></code> in a <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> Docker container.</p> <section id="docker-images"> <h3><a class="toc-backref" href="#docker-images" role="doc-backlink">Docker Images</a></h3> <p>A <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> Docker image based on CentOS 7 x86_64 should be provided for building binary <code class="docutils literal notranslate"><span class="pre">linux</span></code> wheels that can reliably be converted to <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels. This image will come with a full compiler suite installed (<code class="docutils literal notranslate"><span class="pre">gcc</span></code>, <code class="docutils literal notranslate"><span class="pre">g++</span></code>, and <code class="docutils literal notranslate"><span class="pre">gfortran</span></code> 4.8.5) as well as the latest releases of Python and <code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p> </section> <section id="auditwheel"> <h3><a class="toc-backref" href="#auditwheel" role="doc-backlink">Auditwheel</a></h3> <p>The <code class="docutils literal notranslate"><span class="pre">auditwheel</span></code> tool will also be updated to produce <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels. <a class="footnote-reference brackets" href="#id13" id="id7">[8]</a> Its behavior and purpose will be otherwise unchanged from <a class="pep reference internal" href="../pep-0513/" title="PEP 513 – A Platform Tag for Portable Linux Built Distributions">PEP 513</a>.</p> </section> </section> <section id="platform-detection-for-installers"> <h2><a class="toc-backref" href="#platform-detection-for-installers" role="doc-backlink">Platform Detection for Installers</a></h2> <p>Platforms may define a <code class="docutils literal notranslate"><span class="pre">manylinux2014_compatible</span></code> boolean attribute on the <code class="docutils literal notranslate"><span class="pre">_manylinux</span></code> module described in <a class="pep reference internal" href="../pep-0513/" title="PEP 513 – A Platform Tag for Portable Linux Built Distributions">PEP 513</a>. A platform is considered incompatible with <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> if the attribute is <code class="docutils literal notranslate"><span class="pre">False</span></code>.</p> <p>If the <code class="docutils literal notranslate"><span class="pre">_manylinux</span></code> module is not found, or it does not have the attribute <code class="docutils literal notranslate"><span class="pre">manylinux2014_compatible</span></code>, tools may fall back to checking for glibc. If the platform has glibc 2.17 or newer, it is assumed to be compatible unless the <code class="docutils literal notranslate"><span class="pre">_manylinux</span></code> module says otherwise.</p> <p>Specifically, the algorithm we propose is:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">is_manylinux2014_compatible</span><span class="p">():</span> <span class="c1"># Only Linux, and only supported architectures</span> <span class="kn">from</span> <span class="nn">distutils.util</span> <span class="kn">import</span> <span class="n">get_platform</span> <span class="k">if</span> <span class="n">get_platform</span><span class="p">()</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">[</span> <span class="s2">&quot;linux-x86_64&quot;</span><span class="p">,</span> <span class="s2">&quot;linux-i686&quot;</span><span class="p">,</span> <span class="s2">&quot;linux-aarch64&quot;</span><span class="p">,</span> <span class="s2">&quot;linux-armv7l&quot;</span><span class="p">,</span> <span class="s2">&quot;linux-ppc64&quot;</span><span class="p">,</span> <span class="s2">&quot;linux-ppc64le&quot;</span><span class="p">,</span> <span class="s2">&quot;linux-s390x&quot;</span><span class="p">,</span> <span class="p">]:</span> <span class="k">return</span> <span class="kc">False</span> <span class="c1"># Check for presence of _manylinux module</span> <span class="k">try</span><span class="p">:</span> <span class="kn">import</span> <span class="nn">_manylinux</span> <span class="k">return</span> <span class="nb">bool</span><span class="p">(</span><span class="n">_manylinux</span><span class="o">.</span><span class="n">manylinux2014_compatible</span><span class="p">)</span> <span class="k">except</span> <span class="p">(</span><span class="ne">ImportError</span><span class="p">,</span> <span class="ne">AttributeError</span><span class="p">):</span> <span class="c1"># Fall through to heuristic check below</span> <span class="k">pass</span> <span class="c1"># Check glibc version. CentOS 7 uses glibc 2.17.</span> <span class="c1"># PEP 513 contains an implementation of this function.</span> <span class="k">return</span> <span class="n">have_compatible_glibc</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">17</span><span class="p">)</span> </pre></div> </div> </section> <section id="backwards-compatibility-with-manylinux2010-wheels"> <h2><a class="toc-backref" href="#backwards-compatibility-with-manylinux2010-wheels" role="doc-backlink">Backwards compatibility with <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> wheels</a></h2> <p>As explained in <a class="pep reference internal" href="../pep-0513/" title="PEP 513 – A Platform Tag for Portable Linux Built Distributions">PEP 513</a>, the specified symbol versions for <code class="docutils literal notranslate"><span class="pre">manylinux1</span></code> allowed libraries constitute an <em>upper bound</em>. The same is true for the symbol versions defined for <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> in this PEP. As a result, <code class="docutils literal notranslate"><span class="pre">manylinux1</span></code> and <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> wheels are considered <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels. A <code class="docutils literal notranslate"><span class="pre">pip</span></code> that recognizes the <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> platform tag will thus install <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> wheels for <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> platforms – even when explicitly set – when no <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels are available.</p> </section> <section id="pypi-support"> <h2><a class="toc-backref" href="#pypi-support" role="doc-backlink">PyPI Support</a></h2> <p>PyPI should permit wheels containing the <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> platform tag to be uploaded in the same way that it permits <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code>.</p> <p>If technically feasible, PyPI should attempt to verify the compatibility of <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels, but that capability is not a requirement for adoption of this PEP.</p> <p>Package authors should not upload non-compliant <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> wheels to PyPI, and should be aware that PyPI may begin blocking non-compliant wheels from being uploaded.</p> </section> <section id="references"> <h2><a class="toc-backref" href="#references" role="doc-backlink">References</a></h2> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="id8" role="doc-footnote"> <dt class="label" id="id8">[1]<em> (<a href='#id1'>1</a>, <a href='#id2'>2</a>) </em></dt> <dd>CentOS Product Specifications (<a class="reference external" href="https://wiki.centos.org/About/Product">https://wiki.centos.org/About/Product</a>)</aside> <aside class="footnote brackets" id="id9" role="doc-footnote"> <dt class="label" id="id9">[<a href="#id3">3</a>]</dt> <dd>Tracking issue for manylinux2010 rollout (<a class="reference external" href="https://github.com/pypa/manylinux/issues/179">https://github.com/pypa/manylinux/issues/179</a>)</aside> <aside class="footnote brackets" id="id10" role="doc-footnote"> <dt class="label" id="id10">[<a href="#id4">4</a>]</dt> <dd>Red Hat Universal Base Image 7 (<a class="reference external" href="https://access.redhat.com/containers/?tab=overview#/registry.access.redhat.com/ubi7">https://access.redhat.com/containers/?tab=overview#/registry.access.redhat.com/ubi7</a>)</aside> <aside class="footnote brackets" id="id11" role="doc-footnote"> <dt class="label" id="id11">[<a href="#id5">5</a>]</dt> <dd>The CentOS Alternative Architecture Special Interest Group (<a class="reference external" href="https://wiki.centos.org/SpecialInterestGroup/AltArch">https://wiki.centos.org/SpecialInterestGroup/AltArch</a>)</aside> <aside class="footnote brackets" id="id12" role="doc-footnote"> <dt class="label" id="id12">[<a href="#id6">7</a>]</dt> <dd>SOABI support for Python 2.X and PyPy (<a class="reference external" href="https://github.com/pypa/pip/pull/3075">https://github.com/pypa/pip/pull/3075</a>)</aside> <aside class="footnote brackets" id="id13" role="doc-footnote"> <dt class="label" id="id13">[<a href="#id7">8</a>]</dt> <dd>auditwheel (<a class="reference external" href="https://github.com/pypa/auditwheel/">https://github.com/pypa/auditwheel/</a>)</aside> </aside> </section> <section id="acceptance"> <h2><a class="toc-backref" href="#acceptance" role="doc-backlink">Acceptance</a></h2> <p><a class="pep reference internal" href="../pep-0599/" title="PEP 599 – The manylinux2014 Platform Tag">PEP 599</a> was <a class="reference external" href="https://discuss.python.org/t/the-next-manylinux-specification/1043/199">accepted by Paul Moore on July 31, 2019</a>.</p> </section> <section id="copyright"> <h2><a class="toc-backref" href="#copyright" role="doc-backlink">Copyright</a></h2> <p>This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive.</p> </section> </section> <hr class="docutils" /> <p>Source: <a class="reference external" href="https://github.com/python/peps/blob/main/peps/pep-0599.rst">https://github.com/python/peps/blob/main/peps/pep-0599.rst</a></p> <p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-0599.rst">2023-09-09 17:39:29 GMT</a></p> </article> <nav id="pep-sidebar"> <h2>Contents</h2> <ul> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#rationale">Rationale</a></li> <li><a class="reference internal" href="#the-manylinux2014-policy">The <code class="docutils literal notranslate"><span class="pre">manylinux2014</span></code> policy</a></li> <li><a class="reference internal" href="#compilation-of-compliant-wheels">Compilation of Compliant Wheels</a><ul> <li><a class="reference internal" href="#docker-images">Docker Images</a></li> <li><a class="reference internal" href="#auditwheel">Auditwheel</a></li> </ul> </li> <li><a class="reference internal" href="#platform-detection-for-installers">Platform Detection for Installers</a></li> <li><a class="reference internal" href="#backwards-compatibility-with-manylinux2010-wheels">Backwards compatibility with <code class="docutils literal notranslate"><span class="pre">manylinux2010</span></code> wheels</a></li> <li><a class="reference internal" href="#pypi-support">PyPI Support</a></li> <li><a class="reference internal" href="#references">References</a></li> <li><a class="reference internal" href="#acceptance">Acceptance</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> <br> <a id="source" href="https://github.com/python/peps/blob/main/peps/pep-0599.rst">Page Source (GitHub)</a> </nav> </section> <script src="../_static/colour_scheme.js"></script> <script src="../_static/wrap_tables.js"></script> <script src="../_static/sticky_banner.js"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10