mirror of https://github.com/python/peps
397 lines
26 KiB
HTML
397 lines
26 KiB
HTML
|
||
<!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 425 – Compatibility Tags for Built Distributions | peps.python.org</title>
|
||
<link rel="shortcut icon" href="../_static/py.png">
|
||
<link rel="canonical" href="https://peps.python.org/pep-0425/">
|
||
<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 425 – Compatibility Tags for Built Distributions | peps.python.org'>
|
||
<meta property="og:type" content="website">
|
||
<meta property="og:url" content="https://peps.python.org/pep-0425/">
|
||
<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="Python Enhancement Proposals (PEPs)">
|
||
<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> » </li>
|
||
<li><a href="../pep-0000/">PEP Index</a> » </li>
|
||
<li>PEP 425</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 425 – Compatibility Tags for Built Distributions</h1>
|
||
<dl class="rfc2822 field-list simple">
|
||
<dt class="field-odd">Author<span class="colon">:</span></dt>
|
||
<dd class="field-odd">Daniel Holth <dholth at gmail.com></dd>
|
||
<dt class="field-even">BDFL-Delegate<span class="colon">:</span></dt>
|
||
<dd class="field-even">Alyssa Coghlan <ncoghlan at gmail.com></dd>
|
||
<dt class="field-odd">Status<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><abbr title="Accepted and implementation complete, or no longer active">Final</abbr></dd>
|
||
<dt class="field-even">Type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><abbr title="Normative PEP with a new feature for Python, implementation change for CPython or interoperability standard for the ecosystem">Standards Track</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">27-Jul-2012</dd>
|
||
<dt class="field-odd">Python-Version<span class="colon">:</span></dt>
|
||
<dd class="field-odd">3.4</dd>
|
||
<dt class="field-even">Post-History<span class="colon">:</span></dt>
|
||
<dd class="field-even">08-Aug-2012, 18-Oct-2012, 15-Feb-2013</dd>
|
||
<dt class="field-odd">Resolution<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><a class="reference external" href="https://mail.python.org/pipermail/python-dev/2013-February/124116.html">Python-Dev 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="#pep-acceptance">PEP Acceptance</a></li>
|
||
<li><a class="reference internal" href="#rationale">Rationale</a></li>
|
||
<li><a class="reference internal" href="#overview">Overview</a></li>
|
||
<li><a class="reference internal" href="#use">Use</a></li>
|
||
<li><a class="reference internal" href="#details">Details</a><ul>
|
||
<li><a class="reference internal" href="#python-tag">Python Tag</a></li>
|
||
<li><a class="reference internal" href="#abi-tag">ABI Tag</a></li>
|
||
<li><a class="reference internal" href="#platform-tag">Platform Tag</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#id1">Use</a></li>
|
||
<li><a class="reference internal" href="#compressed-tag-sets">Compressed Tag Sets</a></li>
|
||
<li><a class="reference internal" href="#faq">FAQ</a></li>
|
||
<li><a class="reference internal" href="#references">References</a></li>
|
||
<li><a class="reference internal" href="#acknowledgements">Acknowledgements</a></li>
|
||
<li><a class="reference internal" href="#copyright">Copyright</a></li>
|
||
</ul>
|
||
</details></section>
|
||
<div class="pep-banner canonical-pypa-spec sticky-banner admonition attention">
|
||
<p class="admonition-title">Attention</p>
|
||
<p>This PEP is a historical document. The up-to-date, canonical spec, <a class="reference external" href="https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#platform-compatibility-tags" title="(in Python Packaging User Guide)"><span>Platform compatibility tags</span></a>, is maintained on the <a class="reference external" href="https://packaging.python.org/en/latest/specifications/">PyPA specs page</a>.</p>
|
||
<p class="close-button">×</p>
|
||
<p>See the <a class="reference external" href="https://www.pypa.io/en/latest/specifications/#handling-fixes-and-other-minor-updates">PyPA specification update process</a> for how to propose changes.</p>
|
||
</div>
|
||
<section id="abstract">
|
||
<h2><a class="toc-backref" href="#abstract" role="doc-backlink">Abstract</a></h2>
|
||
<p>This PEP specifies a tagging system to indicate with which versions of
|
||
Python a built or binary distribution is compatible. A set of three
|
||
tags indicate which Python implementation and language version, ABI,
|
||
and platform a built distribution requires. The tags are terse because
|
||
they will be included in filenames.</p>
|
||
</section>
|
||
<section id="pep-acceptance">
|
||
<h2><a class="toc-backref" href="#pep-acceptance" role="doc-backlink">PEP Acceptance</a></h2>
|
||
<p>This PEP was accepted by Alyssa Coghlan on 17th February, 2013.</p>
|
||
</section>
|
||
<section id="rationale">
|
||
<h2><a class="toc-backref" href="#rationale" role="doc-backlink">Rationale</a></h2>
|
||
<p>Today “python setup.py bdist” generates the same filename on PyPy
|
||
and CPython, but an incompatible archive, making it inconvenient to
|
||
share built distributions in the same folder or index. Instead, built
|
||
distributions should have a file naming convention that includes enough
|
||
information to decide whether or not a particular archive is compatible
|
||
with a particular implementation.</p>
|
||
<p>Previous efforts come from a time where CPython was the only important
|
||
implementation and the ABI was the same as the Python language release.
|
||
This specification improves upon the older schemes by including the Python
|
||
implementation, language version, ABI, and platform as a set of tags.</p>
|
||
<p>By comparing the tags it supports with the tags listed by the
|
||
distribution, an installer can make an educated decision about whether
|
||
to download a particular built distribution without having to read its
|
||
full metadata.</p>
|
||
</section>
|
||
<section id="overview">
|
||
<h2><a class="toc-backref" href="#overview" role="doc-backlink">Overview</a></h2>
|
||
<p>The tag format is {python tag}-{abi tag}-{platform tag}</p>
|
||
<dl class="simple">
|
||
<dt>python tag</dt><dd>‘py27’, ‘cp33’</dd>
|
||
<dt>abi tag</dt><dd>‘cp32dmu’, ‘none’</dd>
|
||
<dt>platform tag</dt><dd>‘linux_x86_64’, ‘any’</dd>
|
||
</dl>
|
||
<p>For example, the tag py27-none-any indicates compatible with Python 2.7
|
||
(any Python 2.7 implementation) with no abi requirement, on any platform.</p>
|
||
</section>
|
||
<section id="use">
|
||
<h2><a class="toc-backref" href="#use" role="doc-backlink">Use</a></h2>
|
||
<p>The <code class="docutils literal notranslate"><span class="pre">wheel</span></code> built package format includes these tags in its filenames,
|
||
of the form <code class="docutils literal notranslate"><span class="pre">{distribution}-{version}(-{build</span> <span class="pre">tag})?-{python</span> <span class="pre">tag}-{abi</span>
|
||
<span class="pre">tag}-{platform</span> <span class="pre">tag}.whl</span></code>. Other package formats may have their own
|
||
conventions.</p>
|
||
</section>
|
||
<section id="details">
|
||
<h2><a class="toc-backref" href="#details" role="doc-backlink">Details</a></h2>
|
||
<section id="python-tag">
|
||
<h3><a class="toc-backref" href="#python-tag" role="doc-backlink">Python Tag</a></h3>
|
||
<p>The Python tag indicates the implementation and version required by
|
||
a distribution. Major implementations have abbreviated codes, initially:</p>
|
||
<ul class="simple">
|
||
<li>py: Generic Python (does not require implementation-specific features)</li>
|
||
<li>cp: CPython</li>
|
||
<li>ip: IronPython</li>
|
||
<li>pp: PyPy</li>
|
||
<li>jy: Jython</li>
|
||
</ul>
|
||
<p>Other Python implementations should use <code class="docutils literal notranslate"><span class="pre">sys.implementation.name</span></code>.</p>
|
||
<p>The version is <code class="docutils literal notranslate"><span class="pre">py_version_nodot</span></code>. CPython gets away with no dot,
|
||
but if one is needed the underscore <code class="docutils literal notranslate"><span class="pre">_</span></code> is used instead. PyPy should
|
||
probably use its own versions here <code class="docutils literal notranslate"><span class="pre">pp18</span></code>, <code class="docutils literal notranslate"><span class="pre">pp19</span></code>.</p>
|
||
<p>The version can be just the major version <code class="docutils literal notranslate"><span class="pre">2</span></code> or <code class="docutils literal notranslate"><span class="pre">3</span></code> <code class="docutils literal notranslate"><span class="pre">py2</span></code>, <code class="docutils literal notranslate"><span class="pre">py3</span></code> for
|
||
many pure-Python distributions.</p>
|
||
<p>Importantly, major-version-only tags like <code class="docutils literal notranslate"><span class="pre">py2</span></code> and <code class="docutils literal notranslate"><span class="pre">py3</span></code> are not
|
||
shorthand for <code class="docutils literal notranslate"><span class="pre">py20</span></code> and <code class="docutils literal notranslate"><span class="pre">py30</span></code>. Instead, these tags mean the packager
|
||
intentionally released a cross-version-compatible distribution.</p>
|
||
<p>A single-source Python 2/3 compatible distribution can use the compound
|
||
tag <code class="docutils literal notranslate"><span class="pre">py2.py3</span></code>. See <code class="docutils literal notranslate"><span class="pre">Compressed</span> <span class="pre">Tag</span> <span class="pre">Sets</span></code>, below.</p>
|
||
</section>
|
||
<section id="abi-tag">
|
||
<h3><a class="toc-backref" href="#abi-tag" role="doc-backlink">ABI Tag</a></h3>
|
||
<p>The ABI tag indicates which Python ABI is required by any included
|
||
extension modules. For implementation-specific ABIs, the implementation
|
||
is abbreviated in the same way as the Python Tag, e.g. <code class="docutils literal notranslate"><span class="pre">cp33d</span></code> would be
|
||
the CPython 3.3 ABI with debugging.</p>
|
||
<p>The CPython stable ABI is <code class="docutils literal notranslate"><span class="pre">abi3</span></code> as in the shared library suffix.</p>
|
||
<p>Implementations with a very unstable ABI may use the first 6 bytes (as
|
||
8 base64-encoded characters) of the SHA-256 hash of their source code
|
||
revision and compiler flags, etc, but will probably not have a great need
|
||
to distribute binary distributions. Each implementation’s community may
|
||
decide how to best use the ABI tag.</p>
|
||
</section>
|
||
<section id="platform-tag">
|
||
<h3><a class="toc-backref" href="#platform-tag" role="doc-backlink">Platform Tag</a></h3>
|
||
<p>The platform tag is simply <code class="docutils literal notranslate"><span class="pre">distutils.util.get_platform()</span></code> with all
|
||
hyphens <code class="docutils literal notranslate"><span class="pre">-</span></code> and periods <code class="docutils literal notranslate"><span class="pre">.</span></code> replaced with underscore <code class="docutils literal notranslate"><span class="pre">_</span></code>.</p>
|
||
<ul class="simple">
|
||
<li>win32</li>
|
||
<li>linux_i386</li>
|
||
<li>linux_x86_64</li>
|
||
</ul>
|
||
</section>
|
||
</section>
|
||
<section id="id1">
|
||
<h2><a class="toc-backref" href="#id1" role="doc-backlink">Use</a></h2>
|
||
<p>The tags are used by installers to decide which built distribution
|
||
(if any) to download from a list of potential built distributions.
|
||
The installer maintains a list of (pyver, abi, arch) tuples that it
|
||
will support. If the built distribution’s tag is <code class="docutils literal notranslate"><span class="pre">in</span></code> the list, then
|
||
it can be installed.</p>
|
||
<p>It is recommended that installers try to choose the most feature complete
|
||
built distribution available (the one most specific to the installation
|
||
environment) by default before falling back to pure Python versions
|
||
published for older Python releases. Installers are also recommended to
|
||
provide a way to configure and re-order the list of allowed compatibility
|
||
tags; for example, a user might accept only the <code class="docutils literal notranslate"><span class="pre">*-none-any</span></code> tags to only
|
||
download built packages that advertise themselves as being pure Python.</p>
|
||
<p>Another desirable installer feature might be to include “re-compile from
|
||
source if possible” as more preferable than some of the compatible but
|
||
legacy pre-built options.</p>
|
||
<p>This example list is for an installer running under CPython 3.3 on a
|
||
linux_x86_64 system. It is in order from most-preferred (a distribution
|
||
with a compiled extension module, built for the current version of
|
||
Python) to least-preferred (a pure-Python distribution built with an
|
||
older version of Python):</p>
|
||
<ol class="arabic simple">
|
||
<li>cp33-cp33m-linux_x86_64</li>
|
||
<li>cp33-abi3-linux_x86_64</li>
|
||
<li>cp3-abi3-linux_x86_64</li>
|
||
<li>cp33-none-linux_x86_64*</li>
|
||
<li>cp3-none-linux_x86_64*</li>
|
||
<li>py33-none-linux_x86_64*</li>
|
||
<li>py3-none-linux_x86_64*</li>
|
||
<li>cp33-none-any</li>
|
||
<li>cp3-none-any</li>
|
||
<li>py33-none-any</li>
|
||
<li>py3-none-any</li>
|
||
<li>py32-none-any</li>
|
||
<li>py31-none-any</li>
|
||
<li>py30-none-any</li>
|
||
</ol>
|
||
<ul class="simple">
|
||
<li>Built distributions may be platform specific for reasons other than C
|
||
extensions, such as by including a native executable invoked as
|
||
a subprocess.</li>
|
||
</ul>
|
||
<p>Sometimes there will be more than one supported built distribution for a
|
||
particular version of a package. For example, a packager could release
|
||
a package tagged <code class="docutils literal notranslate"><span class="pre">cp33-abi3-linux_x86_64</span></code> that contains an optional C
|
||
extension and the same distribution tagged <code class="docutils literal notranslate"><span class="pre">py3-none-any</span></code> that does not.
|
||
The index of the tag in the supported tags list breaks the tie, and the
|
||
package with the C extension is installed in preference to the package
|
||
without because that tag appears first in the list.</p>
|
||
</section>
|
||
<section id="compressed-tag-sets">
|
||
<h2><a class="toc-backref" href="#compressed-tag-sets" role="doc-backlink">Compressed Tag Sets</a></h2>
|
||
<p>To allow for compact filenames of bdists that work with more than
|
||
one compatibility tag triple, each tag in a filename can instead be a
|
||
‘.’-separated, sorted, set of tags. For example, pip, a pure-Python
|
||
package that is written to run under Python 2 and 3 with the same source
|
||
code, could distribute a bdist with the tag <code class="docutils literal notranslate"><span class="pre">py2.py3-none-any</span></code>.
|
||
The full list of simple tags is:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">pytag</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">'.'</span><span class="p">):</span>
|
||
<span class="k">for</span> <span class="n">y</span> <span class="ow">in</span> <span class="n">abitag</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">'.'</span><span class="p">):</span>
|
||
<span class="k">for</span> <span class="n">z</span> <span class="ow">in</span> <span class="n">archtag</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">'.'</span><span class="p">):</span>
|
||
<span class="k">yield</span> <span class="s1">'-'</span><span class="o">.</span><span class="n">join</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">))</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>A bdist format that implements this scheme should include the expanded
|
||
tags in bdist-specific metadata. This compression scheme can generate
|
||
large numbers of unsupported tags and “impossible” tags that are supported
|
||
by no Python implementation e.g. “cp33-cp31u-win64”, so use it sparingly.</p>
|
||
</section>
|
||
<section id="faq">
|
||
<h2><a class="toc-backref" href="#faq" role="doc-backlink">FAQ</a></h2>
|
||
<dl class="simple">
|
||
<dt>What tags are used by default?</dt><dd>Tools should use the most-preferred architecture dependent tag
|
||
e.g. <code class="docutils literal notranslate"><span class="pre">cp33-cp33m-win32</span></code> or the most-preferred pure python tag
|
||
e.g. <code class="docutils literal notranslate"><span class="pre">py33-none-any</span></code> by default. If the packager overrides the
|
||
default it indicates that they intended to provide cross-Python
|
||
compatibility.</dd>
|
||
<dt>What tag do I use if my distribution uses a feature exclusive to the newest version of Python?</dt><dd>Compatibility tags aid installers in selecting the <em>most compatible</em>
|
||
build of a <em>single version</em> of a distribution. For example, when
|
||
there is no Python 3.3 compatible build of <code class="docutils literal notranslate"><span class="pre">beaglevote-1.2.0</span></code>
|
||
(it uses a Python 3.4 exclusive feature) it may still use the
|
||
<code class="docutils literal notranslate"><span class="pre">py3-none-any</span></code> tag instead of the <code class="docutils literal notranslate"><span class="pre">py34-none-any</span></code> tag. A Python
|
||
3.3 user must combine other qualifiers, such as a requirement for the
|
||
older release <code class="docutils literal notranslate"><span class="pre">beaglevote-1.1.0</span></code> that does not use the new feature,
|
||
to get a compatible build.</dd>
|
||
<dt>Why isn’t there a <code class="docutils literal notranslate"><span class="pre">.</span></code> in the Python version number?</dt><dd>CPython has lasted 20+ years without a 3-digit major release. This
|
||
should continue for some time. Other implementations may use _ as
|
||
a delimiter, since both - and . delimit the surrounding filename.</dd>
|
||
<dt>Why normalise hyphens and other non-alphanumeric characters to underscores?</dt><dd>To avoid conflicting with the “.” and “-” characters that separate
|
||
components of the filename, and for better compatibility with the
|
||
widest range of filesystem limitations for filenames (including
|
||
being usable in URL paths without quoting).</dd>
|
||
<dt>Why not use special character <X> rather than “.” or “-“?</dt><dd>Either because that character is inconvenient or potentially confusing
|
||
in some contexts (for example, “+” must be quoted in URLs, “~” is
|
||
used to denote the user’s home directory in POSIX), or because the
|
||
advantages weren’t sufficiently compelling to justify changing the
|
||
existing reference implementation for the wheel format defined in PEP
|
||
427 (for example, using “,” rather than “.” to separate components
|
||
in a compressed tag).</dd>
|
||
<dt>Who will maintain the registry of abbreviated implementations?</dt><dd>New two-letter abbreviations can be requested on the python-dev
|
||
mailing list. As a rule of thumb, abbreviations are reserved for
|
||
the current 4 most prominent implementations.</dd>
|
||
<dt>Does the compatibility tag go into METADATA or PKG-INFO?</dt><dd>No. The compatibility tag is part of the built distribution’s
|
||
metadata. METADATA / PKG-INFO should be valid for an entire
|
||
distribution, not a single build of that distribution.</dd>
|
||
<dt>Why didn’t you mention my favorite Python implementation?</dt><dd>The abbreviated tags facilitate sharing compiled Python code in a
|
||
public index. Your Python implementation can use this specification
|
||
too, but with longer tags.
|
||
Recall that all “pure Python” built distributions just use ‘py’.</dd>
|
||
<dt>Why is the ABI tag (the second tag) sometimes “none” in the reference implementation?</dt><dd>Since Python 2 does not have an easy way to get to the SOABI
|
||
(the concept comes from newer versions of Python 3) the reference
|
||
implementation at the time of writing guesses “none”. Ideally it
|
||
would detect “py27(d|m|u)” analogous to newer versions of Python,
|
||
but in the meantime “none” is a good enough way to say “don’t know”.</dd>
|
||
</dl>
|
||
</section>
|
||
<section id="references">
|
||
<h2><a class="toc-backref" href="#references" role="doc-backlink">References</a></h2>
|
||
<p>[1] Egg Filename-Embedded Metadata
|
||
(<a class="reference external" href="http://peak.telecommunity.com/DevCenter/EggFormats#filename-embedded-metadata">http://peak.telecommunity.com/DevCenter/EggFormats#filename-embedded-metadata</a>)</p>
|
||
<p>[2] Creating Built Distributions
|
||
(<a class="reference external" href="https://docs.python.org/3.4/distutils/builtdist.html">https://docs.python.org/3.4/distutils/builtdist.html</a>)</p>
|
||
</section>
|
||
<section id="acknowledgements">
|
||
<h2><a class="toc-backref" href="#acknowledgements" role="doc-backlink">Acknowledgements</a></h2>
|
||
<p>The author thanks Paul Moore, Alyssa Coghlan, Marc Abramowitz, and
|
||
Mr. Michele Lacchia for their valuable help and advice.</p>
|
||
</section>
|
||
<section id="copyright">
|
||
<h2><a class="toc-backref" href="#copyright" role="doc-backlink">Copyright</a></h2>
|
||
<p>This document has been placed in the public domain.</p>
|
||
</section>
|
||
</section>
|
||
<hr class="docutils" />
|
||
<p>Source: <a class="reference external" href="https://github.com/python/peps/blob/main/peps/pep-0425.rst">https://github.com/python/peps/blob/main/peps/pep-0425.rst</a></p>
|
||
<p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-0425.rst">2023-10-11 12:05:51 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="#pep-acceptance">PEP Acceptance</a></li>
|
||
<li><a class="reference internal" href="#rationale">Rationale</a></li>
|
||
<li><a class="reference internal" href="#overview">Overview</a></li>
|
||
<li><a class="reference internal" href="#use">Use</a></li>
|
||
<li><a class="reference internal" href="#details">Details</a><ul>
|
||
<li><a class="reference internal" href="#python-tag">Python Tag</a></li>
|
||
<li><a class="reference internal" href="#abi-tag">ABI Tag</a></li>
|
||
<li><a class="reference internal" href="#platform-tag">Platform Tag</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#id1">Use</a></li>
|
||
<li><a class="reference internal" href="#compressed-tag-sets">Compressed Tag Sets</a></li>
|
||
<li><a class="reference internal" href="#faq">FAQ</a></li>
|
||
<li><a class="reference internal" href="#references">References</a></li>
|
||
<li><a class="reference internal" href="#acknowledgements">Acknowledgements</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-0425.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> |