Subject: [bug#40645] [PATCH] Update gpodder to 3.10.15 and enable some tests.

From: Pierre Langlois <[email-masked]>
Date: Wed, 15 Apr 2020 19:29:20 +0200

Hi Guix!

Here are a few patches to update gpodder to the latest release. I've
also just noticed we didn't run its tests, as well as
python-podcastparser's tests, so here we go!

Thanks,
Pierre

From 9da7177a336310baf5928732de7b51f3a5709735 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <[email-masked]>
Date: Wed, 15 Apr 2020 18:40:57 +0200
Subject: [PATCH 1/3] gnu: gpodder: Update to 3.10.15.

* gnu/packages/gpodder.scm (gpodder): Update to 3.10.15.
---
 gnu/packages/gpodder.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gpodder.scm b/gnu/packages/gpodder.scm
index 02aef3ed47..84c63ce806 100644
--- a/gnu/packages/gpodder.scm
+++ b/gnu/packages/gpodder.scm
@@ -38,7 +38,7 @@
 (define-public gpodder
   (package
     (name "gpodder")
-    (version "3.10.13")
+    (version "3.10.15")
     (source
      (origin
        (method git-fetch)
@@ -47,7 +47,7 @@
              (commit version)))
        (sha256
         (base32
-         "1h542syaxsx1hslfzlk3fx1nbp190zjw35kigw7a1kx1jwvfwapg"))
+         "0ghbanj142n0hgydzfjmnkdgri2kswsjal3mn10c723kih4ir4yr"))
        (file-name (git-file-name name version))))
     (build-system python-build-system)
     (native-inputs
--
2.26.1

From ea424d6de55f1731512ac4a62f60d91239abc93e Mon Sep 17 00:00:00 2001
From: Pierre Langlois <[email-masked]>
Date: Wed, 15 Apr 2020 18:41:02 +0200
Subject: [PATCH 2/3] gnu: gpodder: Run tests.

* gnu/packages/gpodder.scm (gpodder)[native-inputs]: Add python-coverage and
python-minimock.
[arguments]: Replace the 'check phase and invoke "make unittest".
---
 gnu/packages/gpodder.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gpodder.scm b/gnu/packages/gpodder.scm
index 84c63ce806..98d7a84ce7 100644
--- a/gnu/packages/gpodder.scm
+++ b/gnu/packages/gpodder.scm
@@ -51,7 +51,9 @@
        (file-name (git-file-name name version))))
     (build-system python-build-system)
     (native-inputs
-     `(("intltool" ,intltool)))
+     `(("intltool" ,intltool)
+       ("python-coverage" ,python-coverage)
+       ("python-minimock" ,python-minimock)))
     (inputs
      `(("gtk+" ,gtk+)
        ("python-pygobject" ,python-pygobject)
@@ -72,6 +74,12 @@
                (substitute* "src/gpodder/util.py"
                  (("xdg-open") (string-append xdg-utils "/bin/xdg-open")))
                #t)))
+         (replace 'check
+           (lambda _
+             ; The `unittest' target overrides the PYTHONPATH variable.
+             (substitute* "makefile"
+               (("PYTHONPATH=src/") "PYTHONPATH=${PYTHONPATH}:src/"))
+             (invoke "make" "unittest")))
          ;; 'msgmerge' introduces non-determinism by resetting the
          ;; POT-Creation-Date in .po files.
          (add-before 'install 'do-not-run-msgmerge
--
2.26.1

From 25db2f9143e3bef649c009a5ae92099c79b8a2aa Mon Sep 17 00:00:00 2001
From: Pierre Langlois <[email-masked]>
Date: Wed, 15 Apr 2020 18:41:07 +0200
Subject: [PATCH 3/3] gnu: python-podcastparser: Run tests.

* gnu/packages/gpodder.scm (python-podcastparser)[native-inputs]: Add
python-coverage.
[arguments]: Replace 'check phase and invoke "nosetests".
---
 gnu/packages/gpodder.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gpodder.scm b/gnu/packages/gpodder.scm
index 98d7a84ce7..6963da9dff 100644
--- a/gnu/packages/gpodder.scm
+++ b/gnu/packages/gpodder.scm
@@ -184,7 +184,13 @@ downloading episode status changes.")
        (sha256
         (base32 "0k62ppg20i41gcc5x8ddjn7zbpy47hqpxzrq9257g2c71m4qw07b"))))
     (native-inputs
-     `(("python-nose" ,python-nose)))
+     `(("python-coverage" ,python-coverage)
+       ("python-nose" ,python-nose)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _ (invoke "nosetests"))))))
     (build-system python-build-system)
     (home-page "http://gpodder.org/podcastparser")
     (synopsis "Simplified and fast RSS parser Python library")
--
2.26.1