Move content from `setup.py` to `setup.cfg`
diegoferigo opened this issue · comments
Recently, in the python packaging world, after PEP517 and PEP518 (what they are), also setup.cfg-only projects became a thing. This is also known as minimal setup.py
.
Unfortunately, we cannot entirely remove setup.py
since the PE517 does not support editable installations, and in any case I couldn't find any alternative of specifying build extensions like we need to compile the CMake project. However, we can move most of the content to setup.cfg
.
There are different advantages:
- This seems the most recent trend in regular Python packaging
- It is compatible with the most recent PEPs
- If other tools are used, like tox/green/flake/mypy, their configuration is stored in the same
config.cfg
- Defining conditional dependencies (PEP508) is more clear
Here below the official documentation and some example from which we can get check their implementation:
- https://setuptools.readthedocs.io/en/latest/build_meta.html
- https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html
- https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
- https://github.com/jwodder/pyrepo/wiki/Project-Metadata
- https://github.com/pypa/build/blob/main/setup.cfg
- https://github.com/pipxproject/pipx/blob/master/setup.cfg
- https://github.com/pyscaffold/pyscaffold/blob/master/setup.cfg
- https://github.com/IdentityPython/pysaml2/blob/master/setup.cfg
- https://github.com/dib-lab/screed/blob/latest/setup.cfg
- GitHub filter
Closed via #364