[Distutils] New PEP : dependency specification
robertc at robertcollins.net
Fri Nov 6 15:11:41 EST 2015
Here's an update I just pushed into git that addresses the defects found so far.
diff --git a/dependency-specification.rst b/dependency-specification.rst
index f8171d8..486636d 100644
@@ -73,7 +73,7 @@ the dependency can be made conditional using
-We first cover the grammar briefly and the drill into the semantics of each
+We first cover the grammar briefly and then drill into the semantics of each
A distribution specification is written in ASCII text. We use ABNF [#abnf]_ to
@@ -92,7 +92,7 @@ URI is defined in std-66 [#std66]_::
version-cmp = "<" / "<=" / "!=" / "==" / ">=" / ">" / "~=" / "==="
version = 1*( DIGIT / ALPHA / "-" / "_" / "." / "*" )
- versionspec = version-cmp version *(',' version-cmp version)
+ versionspec = ["("] version-cmp version *(',' version-cmp version) [")"]
urlspec = "@" URI
Environment markers allow making a specification only take effect in some
@@ -179,7 +179,9 @@ Versions
See PEP-440 [#pep440]_ for more detail on both version numbers and version
comparisons. Version specifications limit the versions of a distribution that
can be used. They only apply to distributions looked up by name, rather than
-via a URL. Version comparison are also used in the markers feature.
+via a URL. Version comparison are also used in the markers feature. The
+optional brackets around a version are present for compatibility with PEP-345
+[#pep345]_ but should not be generated, only accepted.
@@ -302,7 +304,7 @@ Backwards Compatibility
Most of this PEP is already widely deployed and thus offers no compatibiltiy
-There are however two key points where the PEP differs from the deployed base.
+There are however a few points where the PEP differs from the deployed base.
Firstly, PEP-440 direct references haven't actually been deployed in the wild,
but they were designed to be compatibly added, and there are no known
@@ -320,15 +322,21 @@ permitting reasonably graceful upgrade. The new
version comparisons will cause
errors, so adoption may require waiting some time for deployment to be
+Thirdly, PEP-345 required brackets around version specifiers. In order to
+accept PEP-345 dependency specifications, brackets are accepted, but they
+should not be generated.
In order to move forward with any new PEPs that depend on environment markers,
-we needed a specification that included them.
+we needed a specification that included them in their modern form. This PEP
+brings together all the currently unspecified components into a specified
The requirement specifier EBNF is lifted from setuptools pkg_resources
-documentation, since we can't sensible depend on a defacto standard.
+documentation, since we wish to avoid depending on a defacto, vs PEP
Robert Collins <rbtcollins at hp.com>
HP Converged Cloud
More information about the Distutils-SIG