Page MenuHomeSoftware Heritage

Migrate setuptools metadata from setup.py to setup.cfg
Open, NormalPublic

Description

To improve the story around doing programmatic changes to all our repositories, it would be nice if our setuptools metadata was stored in a machine readable format, rather than in code in setup.py. This would also help (a lot) to generate Debian packaging from repositories.

After a cursory look at all our setup.py files, the only thing that needs to change is the pervasive use of requirements*.txt files. We're using them in a way that's discouraged by the Python packaging best practices, so it'd kill two birds with one stone.

This is something that we should replace with:

  • extra requires (which we're already generating)
  • making sure we use these extra requires everywhere (notably, in tox, by using the extras config instead of deps = -r foo.txt or deps = .[extra]).

The only use of requirements.txt left is py-depgraph in swh-environment, but this would be as happy (or even happier) parsing a setup.cfg file (e.g. with crudini).

Event Timeline

olasd triaged this task as Normal priority.Nov 21 2019, 11:14 AM
olasd created this task.
olasd renamed this task from Migrate from setup.py metadata to setup.cfg to Migrate setuptools metadata from setup.py to setup.cfg.Nov 21 2019, 11:29 AM