It\'s not completely clear to me, what is the status of setup.cfg. I am looking for solutions for my other question about PEP 508 environment markers, and I bec
Nope, setup.cfg it is not deprecated and the documentation you mention is misleading.
There were serious reasons like security related to the fact that setup.py needed execution and that's the main reason of moving away from it.
Here is the dirty trick for extras:
[options.extras_require]
pdf = ReportLab>=1.2; RXP
rest = docutils>=0.3; pack ==1.1, ==1.3
I'd like to add a few notes on recent developments:
PEP 518 is still in provisional status, but I'm interpreting it as an invitation to use pyproject.toml instead of setup.cfg. Quoting from the PEP:
There are two issues with
setup.cfgused by setuptools as a general format. One is that they are.inifiles which have issues as mentioned in the configparser discussion above. The other is that the schema for that file has never been rigorously defined and thus it's unknown which format would be safe to use going forward without potentially confusing setuptools installations.
From black's documentation:
PEP 518 defines
pyproject.tomlas a configuration file to store build system requirements for Python projects. With the help of tools like Poetry or Flit it can fully replace the need forsetup.pyandsetup.cfgfiles.
pip 19.0 implemented PEP 517 to allow projects to specify a build backend via pyproject.toml.
setuptools has an open issue titled "Merge setup.cfg spec with pyproject.toml one and deprecate setup.py and setup.cfg". However, setuptools guys have not yet decided on this. There is an open discussion on how to proceed.
Disclaimer: I feel totally lost in Python's packaging jungle myself.