diff mbox series

[bug#70735,012/714] gnu: python-jupytext: Improve package style.

Message ID 20240503224254.28001-12-ngraves@ngraves.fr
State New
Headers show
Series [bug#70735,001/714] gnu: python-transient: Remove python-black native-input. | expand

Commit Message

Nicolas Graves May 3, 2024, 10:18 p.m. UTC
* gnu/packages/python-xyz.scm (python-jupytext): Improve package
style.
  [build-system]: Move to pyproject-build-system.
  [arguments]<#:test-flags>: Add flags.
             <#:phases>: Remove 'check phase replacement.

Change-Id: I5d708c2fc76b609105c1551a6ed1755c56efcada
---
 gnu/packages/python-xyz.scm | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6338750d0b..51273ca91a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -404,26 +404,25 @@  (define-public python-jupytext
        (file-name (git-file-name name version))
        (sha256
         (base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
      (list
+      #:test-flags
+      '(list "-k" (string-append
+                   "not "
+                   (string-join
+                    (list "test_create_header_with_set_formats"
+                          "test_pre_commit_hook"
+                          "test_sync_with_pre_commit_hook")
+                    " and not ")))
       #:phases
       #~(modify-phases %standard-phases
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
+          (add-before 'check 'pre-check
+            (lambda _
               ;; some tests fail when HOME=/homeless-shelter.
               (setenv "HOME" "/tmp")
               ;; OSError: [Errno 18] Invalid cross-device link
-              (setenv "TMPDIR" "/tmp")
-              (when tests?
-                (let ((disabled-tests
-                       (list "test_create_header_with_set_formats"
-                             "test_pre_commit_hook"
-                             "test_sync_with_pre_commit_hook")))
-                  (invoke "pytest" "-vv" "-k"
-                          (string-append "not "
-                                         (string-join disabled-tests
-                                                      " and not "))))))))))
+              (setenv "TMPDIR" "/tmp"))))))
     (native-inputs
      (list git-minimal
            python-autopep8