all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49468] [PATCH] Respect --without-tests in some dependencies of Mirage
@ 2021-07-08 17:43 Maxime Devos
  2021-07-08 19:23 ` bug#49468: " Mathieu Othacehe
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Devos @ 2021-07-08 17:43 UTC (permalink / raw)
  To: 49468; +Cc: slg


[-- Attachment #1.1: Type: text/plain, Size: 623 bytes --]

X-Debbugs-CC: slg <0x2d@disroot.org>

Hi guix,

In the context of <https://issues.guix.gnu.org/49123>,
I'm making some dependencies of mirage respect --without-tests.
The modified packages build successfully with and without --without-tests.

The number of rebuilds is minimal:

$ ./pre-inst-env guix refresh -l libolm python-h2 python-h11 python-hpack python-hyperframe python-watchgod python-pymediainfo
Building the following 5 packages would ensure 12 dependent packages are rebuilt: nheko@0.7.2 python-hypercorn@0.10.2 orange@3.28.0 python-sanic@20.12.2 rapid-photo-downloader@0.9.18

Greetings,
Maxime

[-- Attachment #1.2: 0001-gnu-python-pymediainfo-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 2051 bytes --]

From d2d739db1dc72907df43df156d19f8fefae0c4db Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 17:07:42 +0200
Subject: [PATCH 1/7] gnu: python-pymediainfo: Respect "--without-tests".

* gnu/packages/python-xyz.scm
  (python-pymediainfo)[arguments]<#:phases>{check}: Respect
  #:tests?.  Don't bother returning #t as it isn't required
  anymore.
---
 gnu/packages/python-xyz.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ec4209108f..d42119fd3c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -100,6 +100,7 @@
 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -745,14 +746,14 @@ to CommonMark.")
                                "/lib/libmediainfo.so.0")))
              #t))
          (replace 'check
-           (lambda _
-             ;; Extend PYTHONPATH so the built package will be found.
-             (setenv "PYTHONPATH"
-                     (string-append (getcwd) "/build/lib:"
-                                    (getenv "PYTHONPATH")))
-             ;; Skip the only failing test "test_parse_url"
-             (invoke "pytest" "-vv" "-k" "not test_parse_url")
-             #t)))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; Extend PYTHONPATH so the built package will be found.
+               (setenv "PYTHONPATH"
+                       (string-append (getcwd) "/build/lib:"
+                                      (getenv "PYTHONPATH")))
+               ;; Skip the only failing test "test_parse_url"
+               (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
     (home-page
      "https://github.com/sbraz/pymediainfo")
     (synopsis
-- 
2.32.0


[-- Attachment #1.3: 0002-gnu-python-watchgod-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 1026 bytes --]

From bcff673a068444db93fc840123947c283cac163f Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 17:07:49 +0200
Subject: [PATCH 2/7] gnu: python-watchgod: Respect "--without-tests".

* gnu/packages/python-xyz.scm
  (python-watchgod)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/python-xyz.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d42119fd3c..1a35f02edb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23419,8 +23419,9 @@ but portable.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv"))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv")))))))
     (native-inputs
      `(("python-coverage" ,python-coverage)
        ("python-docutils" ,python-docutils)
-- 
2.32.0


[-- Attachment #1.4: 0003-gnu-python-hyperframe-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 1578 bytes --]

From d97097a9d1c73d6a58d72e360a7c6c82fabfabc3 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 17:12:46 +0200
Subject: [PATCH 3/7] gnu: python-hyperframe: Respect "--without-tests".

* gnu/packages/python-web.scm
  (python-hyperframe)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/python-web.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index d0a4ee9c16..0cccb55f07 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -42,6 +42,7 @@
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -843,9 +844,10 @@ follow links and submit forms.  It doesn’t do JavaScript.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (invoke "pytest" "-vv" "test"))))))
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest" "-vv" "test")))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/python-hyper/hyperframe")
-- 
2.32.0


[-- Attachment #1.5: 0004-gnu-python-hpack-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 1646 bytes --]

From 6fb805811ddc192021f35d9f6ba415de20d7c306 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 17:23:53 +0200
Subject: [PATCH 4/7] gnu: python-hpack: Respect "--without-tests".

* gnu/packages/python-web.scm
  (python-hpack)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/python-web.scm | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 0cccb55f07..b535b54e4d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -877,12 +877,13 @@ into HTTP/2 frames.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (invoke "pytest" "-vv" "test" "-k"
-                     ;; This test will be fixed in the next version. See:
-                     ;; https://github.com/python-hyper/hpack/issues/168.
-                     "not test_get_by_index_out_of_range"))))))
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest" "-vv" "test" "-k"
+                       ;; This test will be fixed in the next version. See:
+                       ;; https://github.com/python-hyper/hpack/issues/168.
+                       "not test_get_by_index_out_of_range")))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "https://hyper.rtfd.org")
-- 
2.32.0


[-- Attachment #1.6: 0005-gnu-python-h11-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 1056 bytes --]

From 188e32b2e29c601a6c9855b6adc4aa566f678d82 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 17:24:22 +0200
Subject: [PATCH 5/7] gnu: python-h11: Respect "--without-tests".

* gnu/packages/python-web.scm
  (python-h11)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/python-web.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index b535b54e4d..f529bd0dd2 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -908,8 +908,9 @@ for use in Python programs that implement HTTP/2.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (invoke "pytest" "-vv"))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv")))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/python-hyper/h11")
-- 
2.32.0


[-- Attachment #1.7: 0006-gnu-python-h2-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 1197 bytes --]

From 2487d91ce980e46e23848db2e79b6a1c0b43fdaa Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 17:41:58 +0200
Subject: [PATCH 6/7] gnu: python-h2: Respect "--without-tests".

* gnu/packages/python-web.scm
  (python-h2)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/python-web.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index f529bd0dd2..7d3c717a61 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -937,9 +937,10 @@ and that could be anything you want.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (invoke "pytest" "-vv" "test"))))))
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "pytest" "-vv" "test")))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)))
     (propagated-inputs
-- 
2.32.0


[-- Attachment #1.8: 0007-gnu-libolm-Respect-without-tests.patch --]
[-- Type: text/x-patch, Size: 1544 bytes --]

From 1c3c16618b3d4cefccc368717c741841c64730bc Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 18:38:25 +0200
Subject: [PATCH 7/7] gnu: libolm: Respect "--without-tests".

* gnu/packages/libolm.scm
  (libolm)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/crypto.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 99455dc632..bd2c462b96 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2020 Hendur Saga <hendursaga@yahoo.com>
 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1314,9 +1315,10 @@ Trusted comments are signed, thus verified, before being displayed.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (with-directory-excursion "tests"
-               (invoke "ctest" ".")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion "tests"
+                 (invoke "ctest" "."))))))))
     (synopsis "Implementation of the olm and megolm cryptographic ratchets")
     (description "The libolm library implements the Double Ratchet
 cryptographic ratchet.  It is written in C and C++11, and exposed as a C
-- 
2.32.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#49468: [PATCH] Respect --without-tests in some dependencies of Mirage
  2021-07-08 17:43 [bug#49468] [PATCH] Respect --without-tests in some dependencies of Mirage Maxime Devos
@ 2021-07-08 19:23 ` Mathieu Othacehe
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Othacehe @ 2021-07-08 19:23 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 49468-done, slg


Hey,

> In the context of <https://issues.guix.gnu.org/49123>,
> I'm making some dependencies of mirage respect --without-tests.
> The modified packages build successfully with and without --without-tests.

Pushed, thanks!

Mathieu




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-08 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 17:43 [bug#49468] [PATCH] Respect --without-tests in some dependencies of Mirage Maxime Devos
2021-07-08 19:23 ` bug#49468: " Mathieu Othacehe

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.