[Distutils] Metadata 2.0: Is there a formal spec for a requirement?

Nick Coghlan ncoghlan at gmail.com
Tue Sep 16 13:39:31 CEST 2014


On 16 September 2014 22:59, Paul Moore <p.f.moore at gmail.com> wrote:
> I feel as though I must be missing something obvious, but is there an
> actual specification of the syntax and semantics of a requirement
> anywhere? I've scanned through the PEP, and while there is a spec for
> the environment marker mini-language, there isn't one for a
> requirement. (As a check I hadn't missed anything obvious, I did a
> text search for the operator ">=" which *is* a valid operator in a
> requirement, and it's not present in a syntax definition or anything
> equivalent.
>
> I ask because I'm looking for a way to find a way of matching a set of
> package/version details against a requirement, and I was coming up
> blank. So I was going to write my own, and then I found that there's
> no spec :-(
>
> Surely having a spec for a requirement has to be part of the sign-off
> requirements for Metadata 2.0?

Donald already noted that most of these details were moved to PEP 440,
despite being in PEP 426 in earlier drafts.

This had two primary benefits:

1. The specifier semantics and the allowed version numbers are closely
intertwined, so describing them together made it easier to ensure they
were consistent (and sufficiently comprehensive).

2. It also meant they were *approved* together, in advance of the rest
of PEP 426. An agreed version numbering scheme on its own isn't
particular useful, without a way to use it to improve pkg_resources
style dependency declarations.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list