diff mbox

[bug#34931,0/5] Add gPodder.

Message ID 87tvfs8kt6.fsf@gmx.com
State Accepted
Headers show

Commit Message

Pierre Langlois March 24, 2019, 1:27 p.m. UTC
Hi Ludo!

Thanks for taking a look!

Ludovic Courtès writes:

> Hello Pierre!
>
> Pierre Langlois <pierre.langlois@gmx.com> skribis:
>
>> Here is a patch series to add gPodder [0] and its dependencies. Since
>> we have a few packages from the same project I thought we'd add a new
>> gpodder.scm file for them.
>>
>> What do you think?
>
> I think it’s a good idea.  All 5 patches LGTM.
>
> Unfortunately, python-mygpoclient fails its tests for me:
>
> --8<---------------cut here---------------start------------->8---
> ======================================================================
> FAIL: test_BadRequest (mygpoclient.http_test.Test_HttpClient)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/guix-build-python-mygpoclient-1.8.drv-0/mygpoclient-1.8/mygpoclient/http_test.py", line 158, in test_BadRequest
>     self.assertRaises(BadRequest, client.GET, path)
> AssertionError: BadRequest not raised by GET
>
> ======================================================================
> FAIL: test_GET (mygpoclient.http_test.Test_HttpClient)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/guix-build-python-mygpoclient-1.8.drv-0/mygpoclient-1.8/mygpoclient/http_test.py", line 163, in test_GET
>     self.assertEquals(client.GET(path), self.RESPONSE)
> AssertionError: b'' != b'Test_GET-HTTP-Response-Content'
>
> ======================================================================
> FAIL: test_GET_after_PUT (mygpoclient.http_test.Test_HttpClient)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/guix-build-python-mygpoclient-1.8.drv-0/mygpoclient-1.8/mygpoclient/http_test.py", line 200, in test_GET_after_PUT
>     self.assertEquals(client.GET(path), self.RESPONSE + str(i).encode('utf-8'))
> AssertionError: b'' != b'Test_GET-HTTP-Response-Content0'
>
> ======================================================================
> FAIL: test_NotFound (mygpoclient.http_test.Test_HttpClient)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/tmp/guix-build-python-mygpoclient-1.8.drv-0/mygpoclient-1.8/mygpoclient/http_test.py", line 148, in test_NotFound
>     self.assertRaises(NotFound, client.GET, path)
> AssertionError: NotFound not raised by GET
>
> […]
> --8<---------------cut here---------------end--------------->8---
>
> Could you take a look?

mmmm that's strange, I can't reproduce those failures, was it on master?

In the meantime, I noticed there was a makefile with a `test` target
which uses the `python-nose` and `python-coverage` packages to run the
tests instead. We can try this, I'm not sure I understand how the python
build system discovered the tests before.

Does the attached patch fix the problem for you? It's a bit of a shot in
the dark.

Also, I fixed the ChangeLog entry, the patch doesn't include a python2
version of the package since I don't expect packages other than gPodder
to depend on this.

Thanks,
Pierre

Comments

Pierre Langlois March 24, 2019, 2:24 p.m. UTC | #1
Pierre Langlois writes:

(snip)

>
> * gnu/packages/podcast.scm (python-mygpoclient): New variable.

Whoops, that's 'gpodder.scm' and not 'podcast.scm' too.
diff mbox

Patch

From 25a1f5a1543274988983cec8bb7e5b9363f382ef Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Wed, 20 Mar 2019 23:55:31 +0000
Subject: [PATCH] gnu: Add python-mygpoclient.

* gnu/packages/podcast.scm (python-mygpoclient): New variable.
---
 gnu/packages/gpodder.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/gpodder.scm b/gnu/packages/gpodder.scm
index 5b872908a5..4eda95e626 100644
--- a/gnu/packages/gpodder.scm
+++ b/gnu/packages/gpodder.scm
@@ -57,6 +57,36 @@ 
 and track podcasts.")
     (license license:lgpl2.1+)))

+(define-public python-mygpoclient
+  (package
+    (name "python-mygpoclient")
+    (version "1.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mygpoclient" version))
+       (sha256
+        (base32
+         "1fi5x6k1mngr0iviw2s4n1f3y2x7pwqy5ivkcrjdprzvwr37f0mh"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-minimock" ,python-minimock)
+       ("python-nose" ,python-nose)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "make" "test"))))))
+    (home-page "https://mygpoclient.readthedocs.io")
+    (synopsis "Python library for the gPodder web service")
+    (description "@code{mygpoclient} provides an easy and structured way to
+access the @url{https://gpodder.net} web services.  In addition to
+subscription list synchronization and storage, the API supports uploading and
+downloading episode status changes.")
+    (license license:gpl3)))
+
 (define-public python-podcastparser
   (package
     (name "python-podcastparser")
--
2.21.0