Patchwork [01/18] gnu: Add python-geventhttpclient.

login
register
mail settings
Submitter ng0
Date Oct. 2, 2016, 11 a.m.
Message ID <20161002110054.2297-2-ngillmann@runbox.com>
Download mbox | patch
Permalink /patch/16175/
State New
Headers show

Comments

ng0 - Oct. 2, 2016, 11 a.m.
From: ng0 <ng0@we.make.ritual.n0.is>

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

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e2e1ec2..d18aa79 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9174,6 +9174,45 @@  to provide a high-level synchronous API on top of the libev event loop.")
 (define-public python2-gevent
   (package-with-python2 python-gevent))
 
+(define-public python-geventhttpclient
+  (package
+    (name "python-geventhttpclient")
+    (version "1.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "geventhttpclient" version))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; https://github.com/gwik/geventhttpclient/pull/82
+                  (delete-file-recursively "src/geventhttpclient/tests/__pycache__")))
+              (sha256
+               (base32
+                "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-certifi" ,python-certifi)
+       ("python-gevent" ,python-gevent)
+       ("python-six" ,python-six)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
+    (home-page "https://github.com/gwik/geventhttpclient")
+    (synopsis "http client library for gevent")
+    (description
+     "High performance, concurrent HTTP client library
+for Python using gevent.")
+    (license (list license:expat
+                   ;; http_parser.c is based on src/http/ngx_http_parse.c
+                   ;; from NGINX copyright Igor Sysoev
+                   license:bsd-3))
+    (properties `((python2-variant . ,(delay python2-geventhttpclient))))))
+
+(define-public python2-geventhttpclient
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-geventhttpclient)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+
 (define-public python-twisted
   (package
     (name "python-twisted")