guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 3eaad37aa5bbc32c9c5d88b9a77d01a3086b3158
Author: Nicolas Graves <[email protected]>
AuthorDate: Sun Dec 21 20:27:37 2025 +0100

    gnu: gourmet: Switch to pyproject.
    
    * gnu/packages/nutrition.scm (gourmet):
    [build-system]: Switch to pyproject-build-system.
    [arguments]<#:modules>: Drop them.
    <#:test-flags>: Set them.
    <#:phases>: Drop 'check phase replacement. Rename phase 'prepare-x to
    'configure-tests.
    [native-inputs]: Add python-setuptools.
    
    Change-Id: I466ddf84a8e92680f7957717f4e08cf4c4e02efa
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/nutrition.scm | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/nutrition.scm b/gnu/packages/nutrition.scm
index 51d326a848..6a8894241f 100644
--- a/gnu/packages/nutrition.scm
+++ b/gnu/packages/nutrition.scm
@@ -100,32 +100,20 @@ in the @url{https://schema.org/Recipe} format.")
           (base32
            "08fbw6zp32ws6w9czwy2sqc9c9izlkglsskshj2114d0l79z4gj8"))
          (patches (search-patches "gourmet-sqlalchemy-compat.patch"))))
-      (build-system python-build-system)
+      (build-system pyproject-build-system)
       (arguments
        (list
-        #:modules `((guix build utils)
-                    (guix build python-build-system)
-                    (ice-9 ftw)
-                    (srfi srfi-26))
+        #:test-flags
+        ;; XXX: Some tests in deeper directories or otherwise discovered by
+        ;; Pytest are broken.
+        #~(list "--ignore-glob=gourmet/tests/**/*.py")
         #:phases
         #~(modify-phases %standard-phases
-            (add-before 'check 'prepare-x
-              ;; Both the tests and the sanity-check phase need an X server to
-              ;; succeed.
+            (add-before 'check 'configure-tests
               (lambda _
+                (setenv "HOME" "/tmp") ;needed by tests
                 (system "Xvfb &")
                 (setenv "DISPLAY" ":0")))
-            (replace 'check
-              (lambda* (#:key tests? #:allow-other-keys)
-                (when tests?
-                  (setenv "HOME" "/tmp") ;needed by tests
-                  (apply invoke "pytest" "-vv"
-                         ;; XXX: This is needed because some tests in deeper
-                         ;; directories or otherwise discovered by Pytest are
-                         ;; broken.
-                         (map (cut string-append "gourmet/tests/" <>)
-                              (scandir "gourmet/tests"
-                                       (cut string-prefix? "test_" <>)))))))
             (add-after 'install 'install-dekstop-file-and-icons
               (lambda _
                 (define share (string-append #$output "/share"))
@@ -137,6 +125,7 @@ in the @url{https://schema.org/Recipe} format.")
        (list python-dogtail
              python-pytest
              python-selenium
+             python-setuptools
              xorg-server-for-tests))
       (inputs
        (list gtk+

Reply via email to