import: pypi: Convert hyphens to underscores in PyPI URLs if needed.
authorVivien Kraus <vivien@planete-kraus.eu>
Thu, 20 Jan 2022 19:11:56 +0000 (20:11 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 26 Jan 2022 16:54:58 +0000 (17:54 +0100)
commitbac9f8302c65802a576f733cc48829edb33019d8
treefc006b0305b91a330d68d92589ce3f1aab9eb6ad
parent8b7bd459dc7f86cf2a9569c35efb4a5d845d63ed
import: pypi: Convert hyphens to underscores in PyPI URLs if needed.

* guix/import/pypi.scm (find-project-url): New function.
(make-pypi-sexp): Use find-project-url.
* tests/pypi.scm (foo-json): New procedure.
(test-json-1, test-json-2): Define in terms of it.
("find-project-url, with numpy", "find-project-url, uWSGI"):
("find-project-url, flake8-array-spacing")
("find-project-url, foo/goo"): New tests.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
guix/import/pypi.scm
tests/pypi.scm