Subject: bug#25746: python-pykka

From: ng0 <[email-masked]>
Date: Sun, 19 Feb 2017 20:53:56 +0000

On 17-02-19 13:02:01, Ricardo Wurmus wrote:
> 
> ng0 <[email-masked]> writes:
> 
> >> > > +    (arguments
> >> > > +     `(#:tests? #f)) ; Testsuite fails for unspecified reasons.
> >> > 
> >> > It would be nice to have some more details here and a FIXME, so that
> >> > dedicated folks could fix this in the future.
> 
> […]
> 
> > I tried running the build using the git versions in the package
> > definition, and the python tests hang forever. I stopped after 3 - 5
> > hours:
> […]
> > test_base_exception_is_logged (tests.logging_test.ConcreteActorLoggingTest.<locals>.C) ...
> >
> >
> > The last one (test_base_exception_is_logged) is the one where it
> > hangs.
> 
> How about disabling that one test then?
> 
> > Without 'mopidy' https://github.com/mopidy I don't know if these
> > test failures are grave or just minor.
> 
> I don’t know how this relates to the rest of this patch.
> 
> > My idea is now to just use the tarball version, skip the tests
> 
> Using the official release is preferred, but I’d rather not skip all the
> tests.  We rarely ever do this unless there are bootstrap issues.
> Please try to disable just the hanging tests instead of the complete
> test suite.
> 
> -- 
> Ricardo
> 
> GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
> https://elephly.net
> 

I fixed it, patches are appended as git send-email is still broken since 82de2655a16dcc7a8e3b992b4afd34ec32c244a6. 
>From 67769beaa0b2411312494707d411e1a45d6ba6e1 Mon Sep 17 00:00:00 2001
From: ng0 <[email-masked]>
Date: Sun, 19 Feb 2017 12:03:31 +0000
Subject: [PATCH 1/2] gnu: Add python-eventlet.

* gnu/packages/python.scm (python-eventlet): New variable.
---
 gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3e59b5892..93bb4ae15 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1006,6 +1006,40 @@ etc.).  The package is structured to make adding new modules easy.")
             "python"
             (package-inputs pycrypto)))))))
 
+(define-public python-eventlet
+  (package
+    (name "python-eventlet")
+    (version "0.20.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "eventlet" version))
+       (sha256
+        (base32
+         "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-greenlet" ,python-greenlet)))
+    (home-page "http://eventlet.net")
+    (synopsis "Concurrent networking library for Python")
+    (description
+     "Eventlet is a concurrent networking library for Python that
+allows you to change how you run your code, not how you write it.
+It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
+Coroutines ensure that the developer uses a blocking style of programming
+that is similar to threading, but provide the benefits of non-blocking I/O.
+The event dispatch is implicit, which means you can easily use @code{Eventlet}
+from the Python interpreter, or as a small part of a larger application.")
+  (license license:expat)))
+
+(define-public python2-eventlet
+  (let ((base (package-with-python2
+                (strip-python2-variant python-eventlet))))
+    (package (inherit base)
+      (propagated-inputs
+       `(("python2-enum34" ,python2-enum34)
+         ,@(package-propagated-inputs base))))))
+
 (define-public python-keyring
   (package
     (name "python-keyring")
-- 
2.11.1

>From 5e9e3e6e74f64bd3e7d8c9d3524f7e21a528554d Mon Sep 17 00:00:00 2001
From: ng0 <[email-masked]>
Date: Mon, 17 Oct 2016 10:30:58 +0000
Subject: [PATCH 2/2] gnu: Add python-pykka.

* gnu/packages/python.scm (python-pykka): New variable.
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 93bb4ae15..961021182 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2648,6 +2648,35 @@ somewhat intelligeble.")
 (define-public python2-pyjwt
   (package-with-python2 python-pyjwt))
 
+(define-public python-pykka
+  (package
+    (name "python-pykka")
+    (version "1.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Pykka" version))
+       (sha256
+        (base32
+         "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)
+       ("python-gevent" ,python-gevent)
+       ("python-eventlet" ,python-eventlet)))
+    (home-page "https://www.pykka.org/")
+    (synopsis "Pykka is a Python implementation of the actor model")
+    (description
+     "Pykka is a Python implementation of the actor model.
+The actor model introduces some simple rules to control the sharing
+of state and cooperation between execution units, which makes it
+easier to build concurrent applications.")
+    (license license:asl2.0)))
+
+(define-public python2-pykka
+  (package-with-python2 python-pykka))
+
 (define-public python-oauthlib
   (package
     (name "python-oauthlib")
-- 
2.11.1