guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: gnu: python-can: Simplify package style.


From: guix-commits
Subject: 03/05: gnu: python-can: Simplify package style.
Date: Wed, 7 Jun 2023 02:54:15 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 15083a2fc37f4c1b1535281d0f82665e55ebbb72
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Wed May 10 23:12:32 2023 +0100

    gnu: python-can: Simplify package style.
    
    * 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}.
    
    Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
 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 ab2e8b7576..c158d9a407 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2696,40 +2696,24 @@ class.")
        (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" "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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]