summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/import/pypi.scm7
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 <[email protected]>
;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
;;; Copyright © 2018, 2023 Ricardo Wurmus <[email protected]>
-;;; Copyright © 2019 Maxim Cournoyer <[email protected]>
+;;; Copyright © 2019, 2024 Maxim Cournoyer <[email protected]>
;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
;;; Copyright © 2020 Lars-Dominik Braun <[email protected]>
;;; Copyright © 2020 Arun Isaac <[email protected]>
@@ -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~%")