unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 74652@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>,
	Lars-Dominik Braun <lars@6xq.net>, Marius Bakke <marius@gnu.org>,
	Munyoki Kilyungi <me@bonfacemunyoki.com>,
	Sharlatan Hellseher <sharlatanus@gmail.com>,
	Tanguy Le Carrour <tanguy@bioneland.org>,
	jgart <jgart@dismail.de>
Subject: [bug#74652] [PATCH v2 3/3] gnu: python-falcon: Fix tests.
Date: Mon,  2 Dec 2024 18:01:42 +0100	[thread overview]
Message-ID: <5aed467adf35fa2211edd82f044cdf9ebd75453a.1733158902.git.rekado@elephly.net> (raw)
In-Reply-To: <08be2c7ed2588b659ad2fa43eddd99c57e10b3f2.1733158902.git.rekado@elephly.net>

* gnu/packages/python-web.scm (python-falcon)[native-inputs]: Add
python-orjson.
[arguments]: Do not patch test file; respect test-flags in custom 'check
phase; provide test-flags to ignore examples and benchmarks.
[build-system]: Use pyproject-build-system.

Change-Id: Ic173e2d940a2bb9c7f81ea3e70475f8bfff36dfb
---
 gnu/packages/python-web.scm | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 2137cc42536..fb43c9b0a06 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -1176,17 +1176,19 @@ (define-public python-falcon
        (sha256
         (base32
          "17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
+     (list
+      #:test-flags
+      '(list "--ignore-glob=examples/*" "--ignore-glob=bench/*" "tests")
+      #:phases
+      '(modify-phases %standard-phases
+         (add-before 'check 'set-HOME
+           (lambda _ (setenv "HOME" "/tmp")))
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Skip orjson, which requires rust to build.
-             (substitute* "tests/test_media_handlers.py"
-               (("== 'CPython") "!= 'CPython"))
-             (setenv "HOME" "/tmp")
-             (invoke "pytest" "-vv" "tests"))))))
+           (lambda* (#:key tests? test-flags #:allow-other-keys)
+             (when tests?
+               (apply invoke "pytest" "-vv" test-flags)))))))
     (propagated-inputs
      (list python-mimeparse))
     (native-inputs
@@ -1197,6 +1199,7 @@ (define-public python-falcon
            python-httpx
            python-mujson
            python-msgpack
+           python-orjson
            python-pecan
            python-pillow
            python-pytest
-- 
2.46.0





  parent reply	other threads:[~2024-12-02 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 15:36 [bug#74652] [PATCH] gnu: python-redis: Update to 5.2.0 Ricardo Wurmus
2024-12-02 17:01 ` [bug#74652] [PATCH v2 1/3] " Ricardo Wurmus
2024-12-02 17:01   ` [bug#74652] [PATCH v2 2/3] gnu: python-fakeredis: Update to 2.26.1 Ricardo Wurmus
2024-12-02 17:01   ` Ricardo Wurmus [this message]
2024-12-03  2:36 ` bug#74652: [PATCH] gnu: python-redis: Update to 5.2.0 Hilton Chain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5aed467adf35fa2211edd82f044cdf9ebd75453a.1733158902.git.rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=74652@debbugs.gnu.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=marius@gnu.org \
    --cc=me@bonfacemunyoki.com \
    --cc=sharlatanus@gmail.com \
    --cc=tanguy@bioneland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).