Text of peps.python.org › pep-0426 as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

PEP 426 – Metadata for Python Software Packages 2.0 | peps.python.org

PEP 426 – Metadata for Python Software Packages 2.0 PEP 426 – Metadata for Python Software Packages 2.0 Author : Alyssa Coghlan <ncoghlan at gmail.com>, Daniel Holth <dholth at gmail.com>, Donald Stufft <donald at stufft.io> BDFL-Delegate : Donald Stufft <donald at stufft.io> Discussions-To : Distutils-SIG list Status : Withdrawn Type : Informational Topic : Packaging Requires : 440 , 508 , 518 Created : 30-Aug-2012 Post-History : 14-Nov-2012, 05-Feb-2013, 07-Feb-2013, 09-Feb-2013, 27-May-2013, 20-Jun-2013, 23-Jun-2013, 14-Jul-2013, 21-Dec-2013 Replaces : 345 Superseded-By : 566 Table of Contents Abstract Note on PEP History Purpose Development, Distribution and Deployment of Python Software Supporting definitions Integration and deployment of distributions Development and publication of distributions Metadata format Metadata files Metadata validation Core metadata Metadata version Generator Name Version Summary Source code metadata Source labels Source URL Semantic dependencies Mapping dependencies to development and distribution activities Extras Dependencies Metadata Extensions Extension versioning Required extension handling Extras (optional dependencies) Updating the metadata specification Appendix A: Conversion notes for legacy metadata Appendix B: Mapping dependency declarations to an RPM SPEC file Appendix C: Summary of differences from PEP 345 Metadata-Version semantics Switching to a JSON compatible format Changing the version scheme Source labels Support for optional dependencies for distributions Support for different kinds of semantic dependencies Support for metadata extensions Appendix D: Deferred features Standard extensions Improved handling of project obsolescence, renames and mergers MIME type registration String methods in environment markers Appendix E: Rejected features Separate lists for conditional and unconditional dependencies Separate lists for semantic dependencies Introducing friction for overly precise dependency declarations Disallowing underscores in distribution names Allowing the use of Unicode in distribution names Depending on source labels Alternative dependencies Compatible release comparisons in environment markers Conditional provides References Copyright Important This PEP is a historical document.

The up-to-date, canonical spec, Core metadata specifications , is maintained on the PyPA specs page . × See the PyPA specification update process for how to propose changes. Important This PEP has been withdrawn. × The ground-up metadata redesign proposed in this PEP has been withdrawn in favour of the more modest proposal in PEP 566 , which retains the basic Key:Value format of previous metadata versions, but also defines a standardised mechanism for translating that format to nested JSON-compatible data structures.

Some of the ideas in this PEP (or the related PEP 459 ) may still be considered as part of later proposals, but they will be handled in a more incremental fashion, rather than as a single large proposed change with no feasible migration plan. Abstract This PEP describes a mechanism for publishing and exchanging metadata related to Python distributions. It includes specifics of the field names, and their semantics and usage.

This document specifies the never released version 2.0 of the metadata format. Version 1.0 is specified in PEP 241 . Version 1.1 is specified in PEP 314 . Version 1.2 is specified in PEP 345 . Version 2.0 of the metadata format proposed migrating from directly defining a custom key-value file format to instead defining a JSON-compatible in-memory representation that may be used to define metadata representation in other contexts (such as API and archive format definitions).

This version also defines a formal extension mechanism, allowing new fields to be added for particular purposes without requiring updates to the core metadata format. Note on PEP History This PEP was initially deferred for an extended period, from December 2013 through to March 2017, as distutils-sig worked through a number of other changes. These changes included: defining a binary compatibility tagging format in PEP 425 defining a binary archive format ( wheel ) in PEP 427 explicitly defining versioning and version comparison in PEP 440 explicitly defining the PyPI “simple” API in PEP 503 explicitly defining dependency specifiers and the extras system in PEP 508 declaring static build system dependencies ( pyproject.toml ) in PEP 518 migrating PyPI hosting to Rackspace, and placing it behind the Fastly CDN shipping pip with CPython by default in PEP 453 , and backporting that addition to Python 2.7 in PEP 477 establishing packaging.python.org as the common access point for Python packaging ecosystem documentation migrating to using the specifications section of packaging.python.org as the central location for tracking packaging related PEPs The time spent pursuing these changes provided additional perspective on which metadata format changes were genuinely desirable, and which could be omitted from the revised specification as merely being “change for change’s sake”.

It also allowed a number of features that aren’t critical to the core activity of publishing and distributing software to be moved out to PEP 459 , a separate proposal for a number of standard metadata extensions that provide additional optional information about a release. As of September 2017, it was deferred again, on the grounds that it doesn’t actually help solve any particularly pressing problems: JSON representation would be better handled through defining a transformation of the existing metadata 1.2 fields clarification of the additional fields defined in the past few years and related changes to the spec management process would be better covered in a minor spec version update Finally, the PEP was withdrawn in February 2018 in favour of PEP 566 (which pursues that more incremental strategy).

Purpose The purpose of this PEP is to define a common metadata interchange format for communication between software publication tools and software integration tools in the Python ecosystem. One key aim is to support full dependency analysis in that ecosystem without requiring the execution of arbitrary Python code by those doing the analysis. Another aim is to encourage good software distribution practices by default, while continuing to support the current practices of almost all existing users of the Python Package Index (both publishers and integrators).

Finally, the aim is to support an upgrade path from the currently in use metadata formats that is transparent to end users. The design draws on the Python community’s nearly 20 years of experience with distutils based software distribution, and incorporates ideas and concepts from other distribution systems, including Python’s setuptools, pip and other projects, Ruby’s gems, Perl’s CPAN, Node.js’s npm, PHP’s composer and Linux packaging systems such as RPM and APT.

While the specifics of this format are aimed at the Python ecosystem, some of the ideas may also be useful in the future evolution of other dependency management ecosystems. Development, Distribution and Deployment of Python Software The metadata design in this PEP is based on a particular conceptual model of the software development and distribution process. This model consists of the following phases: Software development: this phase involves working with a source checkout for a particular application to add features and fix bugs.

It is expected that developers in this phase will need to be able to build the software, run the software’s automated test suite, run project specific utility scripts and publish the software. Software publication: this phase involves taking the developed software and making it available for use by software integrators. This includes creating the descriptive metadata defined in this PEP, as well as making the software available (typically by uploading it to an index server)

The rest of this page is on the live site.