all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56433] [PATCH] import: pypi: Add special treatment for Tryton package names,
@ 2022-07-07  9:47 Hartmut Goebel
  2022-07-08 10:36 ` Munyoki Kilyungi
  2022-07-08 21:37 ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Hartmut Goebel @ 2022-07-07  9:47 UTC (permalink / raw)
  To: 56433

While Trytond modules are Python package, they don't have the "python-"
prefix (see also https://issues.guix.gnu.org/46057#1).  This patch disables
adding the prefix for Trytond modules when importing and updating, thus
inhibiting irritating messages like „consider removing this propagated input:
trytond-party, consider adding this propagated input: python-trytond-party“.

Handling this a special case seems appropriate since (as of now) there are
about 165 packages for Trytond and the number is growing.

* guix/import/pypi.scm(python->package-name): Don't add "python-" prefix for
  trytond packages.
---
 guix/import/pypi.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 130ec769b3..ee74f6065c 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -162,9 +162,11 @@ or #f if there isn't any."
 (define (python->package-name name)
   "Given the NAME of a package on PyPI, return a Guix-compliant name for the
 package."
-  (if (string-prefix? "python-" name)
-      (snake-case name)
-      (string-append "python-" (snake-case name))))
+  (cond
+   ((string-prefix? "python-" name) (snake-case name))
+   ((or (string=? "trytond" name)
+        (string-prefix? "trytond-" name)) (snake-case name))
+   (#t (string-append "python-" (snake-case name)))))
 
 (define (guix-package->pypi-name package)
   "Given a Python PACKAGE built from pypi.org, return the name of the

base-commit: 2b883504288fc48ed1ae80620e664fe5216766c7
-- 
2.30.4





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-15 19:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07  9:47 [bug#56433] [PATCH] import: pypi: Add special treatment for Tryton package names, Hartmut Goebel
2022-07-08 10:36 ` Munyoki Kilyungi
2022-07-08 11:30   ` Hartmut Goebel
2022-07-08 21:36     ` Ludovic Courtès
2022-07-08 21:37 ` Ludovic Courtès
2022-07-11 13:49   ` Hartmut Goebel
2022-07-11 19:54     ` Ludovic Courtès
2022-07-15 19:16       ` bug#56433: " Hartmut Goebel

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.