Competing with PEP-631 for specifying the dependencies in PEP-621.
Rendered: https://github.com/EpicWink/peps/blob/pep-621-exploded-dependencies/pep-9999.rst
Some thoughts:
- Instead of
dependencies
being a table, it could instead be an array of tables, to avoid the same-name-multiple-requirements problem. In this version this is handled by allowing values to be either a table or an array of tables. - Currently in the ecosystem the key for version specifiers is
version
, but I thinkversions
makes more sense. I havenāt seen it in discussion however so Iāve stuck withversion
- Another option for the value of
version
is an array of version specifier clause strings, egversion = [ '~= 3.1', '!= 3.1.3' ]
instead ofversion = '~= 3.1, != 3.1.3'
. This would better better represent the data-models inpackaging
- Specifying a version-only requirement is very straight-forward using dotted keys, which I hadnāt realised before:
numpy.version = '~= 1.18'
. You can of course use dotted keys to specify the other requirement keys, but itās up to the write to choose when to switch an inline-table. - How can I help getting syntax highlighting (via ofekās PR) in these PEPs?
Change-log (click to expand)
2020-09-03
- Add open-issue notes on removing āoptional-dependenciesā table
- Add open-issue note on environment-marker keys
- Add motivation to contrast with the PEP-508 string implementation
- Fix incorrect āversionā keys in example
- Switch to ādirectā table for direct references
- Add depenencies-array to rejected ideas
- Add note on why markers werenāt split
2020-09-06
- Add example implementation for conversion to PEP 508
- Show consistent examples
- Make note about āfileā protocol for direct requirements
- Reject alternate definitions of extra requirements
- Include more arguments against separate ārevisionā field
- Allow version specifiers as requirement specifiers
2020-09-08
- Allow empty string to for any-version
- Add work-around for environment marker keys drawback
- Remove hash from requirement
- Re-open āfor-extraā key issue
- Move direct-reference keys to top-level
- Cleanup TOML example snippets (#2)
- Syntax highlighting (#1)
2020-09-09
- Defer the environment marker keys idea
- Convert optional-deps to table of reqs with extra key