question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Eventually deprecate `setup.cfg` with automatic conversion to `pyproject.toml`

See original GitHub issue

This is a follow up of #1688.

As discussed in the linked issue, the approach setuptools would like to take is to eventually use a single declarative format (pyproject.toml) instead of maintaining 2 (pyproject.toml/setup.cfg).

Originally posted by Paul Ganssle in https://github.com/pypa/setuptools/issues/1688#issue-411224984:

Add pyproject.toml as the one true way to do declarative builds, moving all setuptools configuration over there and deprecating setup.cfg (partially what is discussed in https://github.com/pypa/setuptools/issues/1160, and if we decide on that option we can move over to that issue).

Originally posted by Jason R. Coombs in https://github.com/pypa/setuptools/issues/1688#issuecomment-471212342

One way to ease the transition could be for the setup.cfg code to generate a .toml file and consume then have the pyproject.toml consumer just load both files. That way, a project seeking to transition would only need to do one build, manually merge the two .toml files, and delete setup.cfg.

Originally posted by Paul Ganssle in https://github.com/pypa/setuptools/issues/1688#issuecomment-570933225

I don’t think we should warn if people use setup.cfg even when pyproject.toml is available, we should wait for pyproject.toml configuration to be stable for at least a year before actively pushing it like that.

Relevant tool: ini2toml

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:15
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
thehappycheesecommented, Mar 29, 2022

Thankyou for posting this issue. As someone tinkering on the bleeding edge of packaging tools I have been so confused by the various PEPs and documentation. I thought pyproject.toml was the future but could not find anything definitive to suggest setuptools were going to deprecate setup.cfg.

1reaction
tpvasconceloscommented, Dec 2, 2022

AFAIK the goal is to align on self references at a higher level, such that you don’t have to depend on parser specific features like configparser’s interpolation. Something like:

 [options.extras_require]
 all =
-     %(retrieval)s
-     %(postprocessor)s
-     %(api)s
-     %(validation)s
+     self[retrieval]
+     self[postprocessor]
+     self[api]
+     self[validation]
 retrieval =
-     %(scipy)s
-     %(numpy)s
+     self[scipy]
+     self[numpy]
     pandas>=0.24.1
     rapidfuzz>=0.14.1
 postprocessor =
-     %(pagexml)s
+     self[pagexml]
     jsonschema>=2.6.0
 api =
-     %(postprocessor)s
+     self[postprocessor]
     flask-restx>=1.0.3
 validation =
-     %(numpy)s
+     self[numpy]
     schwifty>=2018.9.1
 scipy =
     scipy>=1.3.0
 numpy =
     numpy>=1.21.2
 pagexml =
     pagexml-slim>=2022.4.12
Read more comments on GitHub >

github_iconTop Results From Across the Web

Is `setup.cfg` deprecated? - python - Stack Overflow
The plan is to deprecate setup.cfg eventually - follow #3214 Eventually deprecate setup.cfg with automatic conversion to pyproject.toml for ...
Read more >
Transition your Python project to use pyproject.toml and setup ...
The future of Python packaging is pyproject.toml, and (for now) setup.cfg, based on PEP 518 and (soon) PEP 621.
Read more >
Doesn't my project need a setup.py or setup.cfg file?
pypa/setuptools: Eventually deprecate setup.cfg with automatic conversion to pyproject.toml. The build fails. How can I find out what's going on? You can ...
Read more >
Frequently Asked Questions - PyScaffold 4.3.1 documentation
Remove the [tool.setuptools_scm] section of pyproject.toml . This will deactivate the automatic version discovery. In practice, following things ...
Read more >
Help testing experimental features in setuptools - Packaging
I know the end goal is to replace setup.cfg with pyproject.toml, ... of eventually deprecating setup.cfg in favour of automatically ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found