Hi, Leo Prikler skribis: > Am Mittwoch, den 23.06.2021, 15:20 +0200 schrieb Ludovic Courtès: >> Hi, >> >> Leo Prikler skribis: >> >> > Am Dienstag, den 22.06.2021, 14:33 +0200 schrieb Ludovic Courtès: >> >> [...] >> >> > > Actually >> > > < >> > > https://files.pythonhosted.org/packages/fe/9d/4e15b2e74044ee051b6939c1b3ff716b0106e8f72d78eab8e08212eab44c/tablib-3.0.0.tar.gz >> > > does not have a ‘requirements.txt’ file, and >> > > < >> > > https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a0287ec9d092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl >> > > doesn’t have much metadata, so I don’t even get where were get >> > > that >> > > info. >> > It does, but it's well hidden in the src tree. I peeked into the >> > guix >> > import code to find it. >> >> Indeed. The tarball above has ‘tests/requirements.txt’: >> >> --8<---------------cut here---------------start------------->8--- >> pytest >> pytest-cov >> MarkupPy >> odfpy >> openpyxl>=2.6.0 >> pandas >> pyyaml >> tabulate >> xlrd >> xlwt >> --8<---------------cut here---------------end--------------->8--- >> >> There are no optional dependencies in that file, though. Or were you >> looking at something else? > The importer and I are looking at something else: > > $ tar xfv tablib-3.0.0.tar.gz tablib-3.0.0/src/tablib.egg- > info/requires.txt | xargs cat > > [all] > markuppy > odfpy > openpyxl>=2.6.0 > pandas > pyyaml > tabulate > xlrd > xlwt > > [cli] > tabulate > > [html] > markuppy > > [ods] > odfpy > > [pandas] > pandas > > [xls] > xlrd > xlwt > > [xlsx] > openpyxl>=2.6.0 > > [yaml] > pyyaml Oooh, I see. So I came up with the following patch, which adds a flag for optional dependencies, based on ‘requires.txt’. Unfortunately, it has no effect for ‘guix import pypi tablib’ because we only look at Wheel info in that case, as per: ;; First, try to compute the requirements using the wheel, else, fallback to ;; reading the "requires.txt" from the egg-info directory from the source ;; archive. (or (guess-requirements-from-wheel) (guess-requirements-from-source)) AFAICS, wheels don’t provide that info, do they? Why does the importer favor .whl in the first place? Is it supposed to be more accurate or more widespread or something? Thoughts? Thanks, Ludo’.