Closed Freed-Wu closed 2 years ago
it should be https://peps.python.org/pep-0518/#tool-table (right, pep only have a number which make it is hard to remember), It suggests every python tool store their setting to pyproject.tomls tool.
So are we not talking about PEP621 at all here, just PEP518?
Specifically you're suggesting to move metadata from https://github.com/google/vimdoc/blob/main/setup.py to pyproject.toml, right? And presumably suggesting the same for vroom at https://github.com/google/vroom/blob/main/setup.py? Is there any practical benefit for converting existing metadata into that structure?
It's my fault to remember two PEP's number :cry:
In conclusion, PEP621 let developer change setup.py to pyproject.toml, (from a python script to a data exchange format), PEP518 let deveoper change the setting of a tool written by python to pyproject.toml's [tool.XXX]
.
Before PEP518, every tool written by python has its own config file, codespell's .codespellrc
, gitlint's .gitlint
.
However, these configuration is different format: dosini (.codespellrc), json (addon-info.json), yaml (.yamllint.yml) toml (pyproject.toml) User must learn dosini, json, yaml, toml, even more language to know their syntaxes. PEP518 summon all python developers use pyproject.toml
, codespell store its configuration to [tool.codespell]
, etc.
In other languages, one configuration file has been accepted broadly, such as nodejs's package.json, julia's project.toml, rust's cargo.toml, etc. PEP518 hope python can use one pyproject.toml to configure all things.
So, if PEP518 is accepted by vimdoc, it should be
[tool.vimdoc]
name=XXX
XXX=XXX
PEP621 isn't related to user, it is just related to developer. It let developer change setup.py
to pyproject.toml
. It can be another issue to explain why.
Because this package has probability to be rewriten in other language, close it. See https://github.com/google/vimdoc/issues/118#issuecomment-1328105580
According to https://peps.python.org/pep-0621, any python project should store its metadata in
pyproject.toml
, not.gitlint
,.yamllint.yaml
,.vintrc.yml
,addon-info.json
, or other thing.Many projects have support PEP621, such as
So I advise this project can support, too.
Before python3.11, toml support must be provided by third-party package, such as
You can use one as extras_require.
After python3.11, tomllib is a builtin package. Not need install any toml package. Remember
python<3.11
in requirements.txt