~ruther/guix-local

97dccd6449aba9d44175960081411c1e57247308 — Maxim Cournoyer 1 year, 5 months ago 2c9867f
import/pypi: Fix project URL discovery when the project name contains periods.

* guix/import/pypi.scm (find-project-url): Add an extra candidate rewriting
periods to underscores in the project name.

Change-Id: I7e3afc63bcc87fafa40fcff2b394b90633d23067
1 files changed, 5 insertions(+), 2 deletions(-)

M guix/import/pypi.scm
M guix/import/pypi.scm => guix/import/pypi.scm +5 -2
@@ 4,7 4,7 @@
;;; Copyright © 2015-2017, 2019-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018, 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>


@@ 457,10 457,13 @@ downloads the source and possibly the wheel of PYPI-PACKAGE."
  "Try different project name substitution until the result is found in
pypi-uri.  Downcase is required for \"uWSGI\", and
underscores are required for flake8-array-spacing."
  ;; XXX: Each tool producing wheels and sdists appear to have their own,
  ;; distinct, naming scheme.
  (or (find (cut string-contains pypi-url <>)
            (list name
                  (string-downcase name)
                  (string-replace-substring name "-" "_")))
                  (string-replace-substring name "-" "_")
                  (string-replace-substring name "." "_")))
      (begin
        (warning
         (G_ "project name ~a does not appear verbatim in the PyPI URI~%")