* Chris Lamb <la...@debian.org> [2023-01-20 01:47]: [...] > As to a solution, though, I think this is somewhat blocking on Mattia's > expertise in the generation of the Python test recommends. Are we, in > essence, trying to parse the following data in setup.py? > > install_requires=[ > "python-magic", > "libarchive-c", > ], > extras_require={ > "distro_detection": ["distro"], > "cmdline": ["argcomplete", "progressbar"], > "comparators": [ > "androguard", > "binwalk", > "defusedxml", > "guestfs", > "jsondiff", > "python-debian", > "pypdf", > "pyxattr", > "rpm-python", > "tlsh", > ], > }, > > If so, we don't necessarily have to wholesale move to pyproject.toml; > instead, we could rejig setup.py...?
It seems that way. And doing so via pep517, which uses pip to install the requirements in a temporary environment, which I assume is why it accesses the network sometimes (but not always): to install missing requirements when the Debian package is not already installed on the system. I've proposed an MR [1] that moves the extras_require to a JSON file and uses that from both setup.py and generate-recommends.py; I've confirmed it produces the same debian/tests/control.tmp as before. - FC [1] https://salsa.debian.org/reproducible-builds/diffoscope/-/merge_requests/121