diff options
author | 宋文武 <iyzsong@gmail.com> | 2016-06-04 14:41:42 +0800 |
---|---|---|
committer | 宋文武 <iyzsong@gmail.com> | 2016-06-04 15:07:11 +0800 |
commit | d79a343b91202a927f76a850be0e3db527960a21 (patch) | |
tree | 3fafea5cc809b85f2b3aaf68ea513c84d63ca34e | |
parent | 68b9d2422cfceef459e8bee6833e19ff5608d3f4 (diff) | |
download | guix-d79a343b91202a927f76a850be0e3db527960a21.tar.gz |
gnu: Add python-gevent and python2-gevent.
* gnu/packages/python.scm (python-gevent, python2-gevent): New variables.
-rw-r--r-- | gnu/packages/python.scm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2abf6bedce..456bf3b30e 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)) |