From patchwork Wed May 10 22:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 49924 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 6050327BBEE; Wed, 10 May 2023 23:13:41 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 A950927BBEC for ; Wed, 10 May 2023 23:13:39 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pws3W-0000xW-9e; Wed, 10 May 2023 18:13:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pws3T-0000x7-Sf for guix-patches@gnu.org; Wed, 10 May 2023 18:13:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pws3T-0000Pd-JM for guix-patches@gnu.org; Wed, 10 May 2023 18:13:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pws3T-0004V7-EB for guix-patches@gnu.org; Wed, 10 May 2023 18:13:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63429] [PATCH 2/4] gnu: python-can: Simplify package style. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 May 2023 22:13:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63429 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63429@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 63429-submit@debbugs.gnu.org id=B63429.168375676617257 (code B ref 63429); Wed, 10 May 2023 22:13:03 +0000 Received: (at 63429) by debbugs.gnu.org; 10 May 2023 22:12:46 +0000 Received: from localhost ([127.0.0.1]:49181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pws3B-0004UB-Tp for submit@debbugs.gnu.org; Wed, 10 May 2023 18:12:46 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:53271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pws39-0004TV-0W for 63429@debbugs.gnu.org; Wed, 10 May 2023 18:12:44 -0400 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3f4271185daso38142445e9.2 for <63429@debbugs.gnu.org>; Wed, 10 May 2023 15:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683756757; x=1686348757; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YmDCIPYoUnV0HEMlX6VPj5ypNN+2nChGHvDPxe4AH4A=; b=HV0rjn6uwVsKIvQHuCjFiWLuCL9OvOPyYHPfDfmmjAlrP+SOirwv0XtqCLYCqRSERT bfTaOkG+Qo7IkPd8ODYwjktt+GpnW3cT+TtqLCW4Rm5j8Vhzc3z5BXkF2/bQfTPXllWF buOCbi4AFJKzHO8f+iXWlBogfCu1RNx8OP86FB5u6MC+rvt/keMkUt68Gn/yg+lfy4QG 3KTdxCPXJ4eLv76e4m00+WAwYiVSxmG4pzUIpfippe95ZMB+/rBACONgrKHjFpCcN5Qq OjGSLWyfHIqoDvz5Sp03oFwVnJFACCnerLrlHrTmnXJRkMxYofy7oZ7iSwd7ykpXneTH 5RJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683756757; x=1686348757; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YmDCIPYoUnV0HEMlX6VPj5ypNN+2nChGHvDPxe4AH4A=; b=Ysy/0Kr8vrLTeASsEOMu+5G5yBRQezRdpnelqvTPQtJ5lDATWzULUHCi2LXPL8S5yM GzVe550Yjd8+YWZ8DshC2Gb1KN2+1fq4temN8YGqgfiuVWUcV3DKmOa/4c3CVaJPZPGk kxRpKP+ikISHOsKan2arrCr674B7zR5EJ2o9pvtzBR7wKyP56C6KVJsIqBX1yu12hRAQ +m1JZZGjdvmleQ4Ut68Wi2os+7+a4aQD9oQPrL2UbLx8yfo1fdyiEg44bP50j+NCoYKz ZSSjN8qkGzulg/2WQVgK0ObKp6+nWEFrht0XOUs3PA4Oa7bUIRoZJvTal28L4hctKPmN H6eA== X-Gm-Message-State: AC+VfDwcKidxpZ+hgkRKVmWh6h04ki4NeM52ZaGtXQIsuR1rZym7xpa7 yE/QbhMHy3F+Ey/Lm2M8LzGQnHKSsBo= X-Google-Smtp-Source: ACHHUZ7I9YgqRi9Nid17d9s63s1sLP9UrgdnBUG+Ho5Af2xHXhecCQdk6rCAMzh+lQWys8XsMg8lYA== X-Received: by 2002:a05:600c:208:b0:3f4:2572:2259 with SMTP id 8-20020a05600c020800b003f425722259mr7513573wmi.28.1683756757416; Wed, 10 May 2023 15:12:37 -0700 (PDT) Received: from guxtil.incerto.xyz (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id f25-20020a1c6a19000000b003f4290720cbsm7643823wmc.29.2023.05.10.15.12.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 15:12:36 -0700 (PDT) From: Sharlatan Hellseher Date: Wed, 10 May 2023 23:12:32 +0100 Message-Id: <1df36bb06bf3fa14062dc3da5fd2d3942b837f6b.1683756318.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/package/python-xyz.scm (python-can): Simplify package style. [build-system]: Use pyproject-build-system. [argument]: Use Gexp. Remove redundant modify-phases procedure. Add {test-flags}. --- gnu/packages/python-xyz.scm | 44 ++++++++++++------------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c67dae29a1..c22a1aad77 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2556,40 +2556,24 @@ (define-public python-can (sha256 (base32 "1w5sdzxivpd3pw4pypwnjlksvfimdb93qnlddbrh5f13flhsgg8g")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'relax-version-requirements - (lambda _ - (substitute* "setup.py" - (("mock~=2\\.0") "mock") - (("coverage<5") "coverage") - (("pytest~=4\\.6") "pytest") - (("pytest-timeout~=1\\.3") "pytest-timeout") - (("pytest-cov.*") "pytest-cov\n") - (("hypothesis~=4\\.56") "hypothesis")))) - (add-after 'unpack 'fix-broken-tests - ;; The tests try to run two scripts it expects should be - ;; in PATH, but they aren't at this time (see: - ;; https://github.com/hardbyte/python-can/issues/805). - (lambda _ - (substitute* "test/test_scripts.py" - (("\"can_logger\\.py --help\"") "") - (("\"can_player\\.py --help\"") "")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "test" - ;; Disable tests which require specific CAN - ;; drivers we have no package for in Guix. - "--ignore" "test/test_interface_canalystii.py" - ;; These tests fail with "OSError: [Errno 19] - ;; No such device". - "-k" "not BasicTestUdpMulticastBusIPv"))))))) + (list + #:test-flags + #~(list + ;; TODO: Check if it could be packed: + ;; https://github.com/projectgus/python-canalystii + ;; + ;; Disable tests which require specific CAN drivers we have no + ;; package for in Guix. + "--ignore" "test/test_interface_canalystii.py" + ;; These tests fail with "OSError: [Errno 19] No such device". + "-k" (string-append "not BasicTestUdpMulticastBusIPv")))) (propagated-inputs (list python-msgpack python-typing-extensions python-wrapt)) (native-inputs - (list python-codecov + (list ;; python-canalystii ; Not packed yet + python-codecov python-coverage python-future python-hypothesis