Move from setup.cfg to pyproject.toml
See original GitHub issueDiscussed on #313.
Apparently black only supports pyproject.toml, while I always use make format
and therefore don’t care about where config is defined, we should make pydantic as easy for others to develop as possible.
Are there any downsides to pyproject.toml?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Transition your Python project to use pyproject.toml and setup ...
Transition your Python project to use pyproject.toml and setup.cfg! (An example.) · configuration files are better than scripts · a few standard ...
Read more >Issues - GitHub
cfg and move all project metadata and packaging/buiding to pyproject.toml . Here are some related resources I found on the internet: PEPs. PEP ......
Read more >Understanding setup.py, setup.cfg and pyproject.toml in Python
This blog post is designed to clarify my thinking around installing Python packages and the use of setup.py, setup.cfg and pyproject.toml ...
Read more >Configuring setuptools using pyproject.toml files
Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata. Setuptools has adopted this standard ...
Read more >Migration from setup.py to pyproject.toml - Stack Overflow
I'm currently trying to move our internal projects away from setup.py to pyproject.toml (PEP-518). I'd like to not use build backend ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just to add my 2 cents about choosing a new build tool, and the differences between Flit and Poetry, from what I have found about all this.
I haven’t even developed a personal preference yet, but as it was a bit confusing for me, here’s a summary of what I have found.
pipenv
was developed with a filePipfile
(also in TOML format) to replacevenv
andrequirements.txt
at the same time. It was adopted and endorsed by PyPA (Python Package Authority, the guys that run PyPI).They wrote the PEP about
pyproject.toml
, it is the new “standard” file by PyPA). It’s supposed to be an alternative comparable tosetup.py
andsetup.cfg
. Not to “deprecate” them necessarily, but to make them optional. As everything is declared in a simpler configuration file, it’s supposed to centralize and simplify package configuration.Poetry and Flit both use the same
pyproject.toml
file, but in a slightly different way.Flit uses it as it was intended, and so it’s endorsed by PyPA, to do project building and publishing. Nothing else.
Poetry uses the same file to handle package building and publishing but also puts development dependencies in there. And it also handles development virtual environments. So, it intends to replace
setup.py
,setup.cfg
but alsoPipfile
(and with thatrequirements.txt
). And to replacevenv
andpipenv
as commands. More likenpm
does in the JavaScript world. Everything is done withnpm
and there’s a singlepackage.json
file.Poetry creator and PyPA guys even had some arguments about all the subject.
Flit seems to be more “standard” and “endorsed”, but Poetry seems to be more popular.
With Flit, the
pyproject.toml
file would only be replacingsetup.py
and setup.cfg, but Flit wouldn't care if you use
requirements.txt,
Pipfile` or anything else for development. It would only care about package building.Update: looks like isort (https://github.com/timothycrosley/isort/issues/705), pytest (https://github.com/pytest-dev/pytest/issues/1556, released in v6.0.0rc1), and coverage (https://github.com/nedbat/coveragepy/issues/664) all support
pyproject.toml
now.