From patchwork Thu Jul 7 09:47:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 3654 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0511327BBEA; Thu, 7 Jul 2022 10:48:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AF7EE27BBE9 for ; Thu, 7 Jul 2022 10:48:16 +0100 (BST) Received: from localhost ([::1]:52620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9O7L-0007WU-R6 for patchwork@mira.cbaines.net; Thu, 07 Jul 2022 05:48:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9O78-0007Ur-MU for guix-patches@gnu.org; Thu, 07 Jul 2022 05:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9O78-0002qD-Bo for guix-patches@gnu.org; Thu, 07 Jul 2022 05:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o9O78-0001LJ-6O for guix-patches@gnu.org; Thu, 07 Jul 2022 05:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56433] [PATCH] import: pypi: Add special treatment for Tryton package names, Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Jul 2022 09:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56433 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56433@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16571872414088 (code B ref -1); Thu, 07 Jul 2022 09:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2022 09:47:21 +0000 Received: from localhost ([127.0.0.1]:55814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9O6T-00013e-Ef for submit@debbugs.gnu.org; Thu, 07 Jul 2022 05:47:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:49764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9O6R-000126-Cw for submit@debbugs.gnu.org; Thu, 07 Jul 2022 05:47:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9O6Q-000722-Ok for guix-patches@gnu.org; Thu, 07 Jul 2022 05:47:19 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:45621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9O6O-0002l9-Pf for guix-patches@gnu.org; Thu, 07 Jul 2022 05:47:18 -0400 Received: from hermia.goebel-consult.de ([79.211.186.65]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MEmIl-1oOTzX3Inj-00GKUa for ; Thu, 07 Jul 2022 11:47:12 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id AE70D5F535; Thu, 7 Jul 2022 11:47:15 +0200 (CEST) From: Hartmut Goebel Date: Thu, 7 Jul 2022 11:47:10 +0200 Message-Id: <026f292cc13e95239135786a8ad830a29d483e41.1657187223.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.4 MIME-Version: 1.0 X-Provags-ID: V03:K1:39D953KeVLq/g5cVP1GN0zYX4GhHsTFXNGfOEuub2JKBn6KXZot NkM950NWxkBRcGP6e2XgLr4bGTApL88Iq0jfeDOOmBYeWMd//N0zEuWwTZBOR5urFDQFwmY DIChFq9JKdCy+yZYJ12DOrCqeKbxMp8v1souv8gdbcyTRs+1ZMycj1U3GWt0ZHhf42Jzs68 wCrvC/hUQKluAV6dNJZng== X-UI-Out-Filterresults: notjunk:1;V03:K0:upkX5YRveGU=:Y5BHawLPk/8D6E+zEC+3W6 a8f2GXvs0FDqITJPX4BG+KRSaPAH8S7TYa1Yi8Xw8RHD8TrCnyuG/f1Q/sweu5RbkGUwG3ikG qfq/iDgX84htZnIiV0dIQxgUBm442hfkbBL287hdN4PSHygOaAc1ao7OzA4embS0j2jI5kuJj cTfks+ElvRjJPsPlp3cexoZsTKD/GvXUG2zJZSk22k8L9LBDeuoq6CuYjxVMzO3JQn9TsrMdQ 79RHUGF0TV9MmOAaX8qElarXYR/rcgPUUwYLdEZowIRYrQbqEjuoUfpPaDuOkrAXXm9mTbJVA Xin1McbTTCeCcTRbhFlA8KkUdxX27MHPq3F0myWycK32CLZWaqlsP+wCnnEB0CcLOz8Fc4frB ObuMjE6ajD5Shcz0WPZusRmwt4EShxl5is0SMi2rWcSM0v7pirFgpU/BgwqLYxoGRNGa8lsBV vZX33BNo/AJmc7XX5Q4AEDjnWFIsugV27fCwGX9DSRGH4z4EXskUYcZXD/+ZUIU1NA9K0k7b/ xmYmzBpxR2zlCBLGaP+ujhiO1NSwu2mE9hlDhN7bcO2hYwmJtnTQCMIPOgHdvgZhzfcZEKA2v 3TSS9fMdJX2masl6ceZtXi9Io4bi5ORM0a9hKdzgfMrIF7Cd4DBibGELNyAgz4l8X+/NJjy5U ebcJLjaPtfxqzqoKbCFSJ4mtKfBNvyV52xMqwG3684KwfOx3G7L5QHMc246YekTPdjbreA0Qz 5gVURSAVemIyjU6KUTwEPPSg1KnCJl1p1jwZsqiXYe0RswCcISAqR2qG/N8= Received-SPF: none client-ip=212.227.126.133; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_FILL_THIS_FORM_SHORT=0.01, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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(-) base-commit: 2b883504288fc48ed1ae80620e664fe5216766c7 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