diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-12-12 22:04:30 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-12-16 09:54:23 +0900 |
commit | 97dccd6449aba9d44175960081411c1e57247308 (patch) | |
tree | 8c7a79d98d3e6b269bc82fc4946a71f821d03321 | |
parent | 2c9867fde520bc05f85975e9a6fd4e46dc1dc4f9 (diff) | |
download | guix-97dccd6449aba9d44175960081411c1e57247308.tar.gz guix-97dccd6449aba9d44175960081411c1e57247308.zip |
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
-rw-r--r-- | guix/import/pypi.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 7b9f54a200..479b4684a3 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -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~%") |