diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-07 16:20:29 +0900 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-04-14 13:34:00 +0900 |
commit | 5af2a0c3905f9f9074596f1e8d7bdce1ef8d7ebd (patch) | |
tree | 919bdd82ef0586d64e86d379300ba4b015fde87a | |
parent | 19de75a16532c95f9ef8755e115f2f7bb89cad27 (diff) |
import/pypi: Improve renaming procedure.
A package named upstream like 'tmdb-python' now gets named 'python-tmdb'
instead of 'python-tmdb-python', which is ugly and doesn't match our
convention (info "(guix) Python Modules").
* guix/import/pypi.scm (python->package-name): Turn a -python suffix into a
python- prefix.
Change-Id: I7c0227d569c0afe6b16329d7cedb51728e4365b0
-rw-r--r-- | guix/import/pypi.scm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index dd43ebdcf3..5e2c6ec9ff 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -179,6 +179,8 @@ or #f if there isn't any." package." (cond ((string-prefix? "python-" name) (snake-case name)) + ((string-suffix? "-python" name) + (string-append "python-" (string-drop-right name 7))) ((or (string=? "trytond" name) (string-prefix? "trytond-" name)) (snake-case name)) (else (string-append "python-" (snake-case name))))) |