guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: Add python-gevent and python2-gevent.


From: ???
Subject: 02/02: gnu: Add python-gevent and python2-gevent.
Date: Sat, 4 Jun 2016 07:07:38 +0000 (UTC)

iyzsong pushed a commit to branch master
in repository guix.

commit d79a343b91202a927f76a850be0e3db527960a21
Author: 宋文武 <address@hidden>
Date:   Sat Jun 4 14:41:42 2016 +0800

    gnu: Add python-gevent and python2-gevent.
    
    * gnu/packages/python.scm (python-gevent, python2-gevent): New variables.
---
 gnu/packages/python.scm |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 2abf6be..456bf3b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -45,6 +45,7 @@
   #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages adns)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages compression)
@@ -58,6 +59,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages libevent)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages maths)
@@ -8941,3 +8943,42 @@ are synchronized with data exchanges on \"channels\".")
 
 (define-public python2-greenlet
   (package-with-python2 python-greenlet))
+
+(define-public python-gevent
+  (package
+    (name "python-gevent")
+    (version "1.1.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "gevent" version))
+              (sha256
+               (base32
+                "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; unbunding libev and c-ares
+                  (for-each delete-file-recursively '("libev" "c-ares"))
+                  ;; fixing testsuite
+                  (call-with-output-file "greentest/__init__.py" noop)
+                  (substitute* "greentest/testrunner.py"
+                    (("import util") "from . import util")
+                    (("from util import log") "from .util import log"))))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-greenlet" ,python-greenlet)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-six" ,python-six)))
+    (inputs
+     `(("c-ares" ,c-ares)
+       ("libev" ,libev)))
+    (home-page "http://www.gevent.org/";)
+    (synopsis "Coroutine-based network library")
+    (description
+     "gevent is a coroutine-based Python networking library that uses greenlet
+to provide a high-level synchronous API on top of the libev event loop.")
+    (license license:expat)))
+
+(define-public python2-gevent
+  (package-with-python2 python-gevent))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]