unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Danny Milosavljevic <dannym@scratchpost.org>, guix-devel@gnu.org
Subject: Re: [PATCH 5/8] gnu: Add python-geventhttpclient.
Date: Tue, 17 Jan 2017 23:48:21 +0100	[thread overview]
Message-ID: <8760ldb8wa.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20170117222548.13995-6-dannym@scratchpost.org>


[-- Attachment #1.1: Type: text/plain, Size: 1651 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> * gnu/packages/python.scm (python-geventhttpclient, python2-geventhttpclient):
>   New variables.
> ---
>  gnu/packages/python.scm | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index deb801631..8c81eae64 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -12656,6 +12656,29 @@ Features:
>  @end enumerate")
>      (license (license:x11-style "file://LICENSE"))))
>  
> +(define-public python-geventhttpclient
> +  (package
> +    (name "python-geventhttpclient")
> +    (version "1.3.1")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "geventhttpclient" version))
> +        (sha256
> +          (base32 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-gevent" ,python-gevent)
> +       ("python-six" ,python-six)
> +       ("python-certifi" ,python-certifi)))
> +    (home-page "http://github.com/gwik/geventhttpclient")
> +    (synopsis "HTTP client library for gevent")
> +    (description "This package provides an HTTP client library for gevent in Python.")
> +    (license license:expat)))
> +
> +(define-public python2-geventhttpclient
> +  (package-with-python2 python-geventhttpclient))

'python setup.py test' doesn't actually do anything on this package. In
addition, the tarball comes with .pyc files for the tests and breaks.

Here is a patch with .pyc files removed and tests enabled:


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python-geventhttpclient.patch --]
[-- Type: text/x-patch, Size: 2607 bytes --]

From b991e2e4981bf8c05bf524f6eb87d47adebc2090 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Tue, 17 Jan 2017 23:13:19 +0100
Subject: [PATCH] gnu: Add python-geventhttpclient.

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a3a3c6c45..afbb3a367 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10515,6 +10515,51 @@ 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))
+              (sha256
+               (base32
+                "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Delete pre-compiled files.
+                  (for-each delete-file (find-files "src/geventhttpclient"
+                                                    ".*\\.pyc"))
+                  #t))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'delete-network-tests
+           (lambda _
+             (delete-file "src/geventhttpclient/tests/test_client.py")
+             #t))
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-certifi" ,python-certifi)
+       ("python-gevent" ,python-gevent)
+       ("python-six" ,python-six)))
+    (home-page "http://github.com/gwik/geventhttpclient")
+    (synopsis "HTTP client library for gevent")
+    (description "@code{python-geventhttpclient} is a high performance,
+concurrent HTTP client library for python using @code{gevent}.")
+    (license license:expat)))
+
+(define-public python2-geventhttpclient
+  (package-with-python2 python-geventhttpclient))
+
 (define-public python-twisted
   (package
     (name "python-twisted")
-- 
2.11.0


  reply	other threads:[~2017-01-17 22:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gu878tqpjw93.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me>
2017-01-17 22:25 ` [PATCH 0/8] Make python-oslosphinx work in python-tests branch Danny Milosavljevic
2017-01-17 22:25   ` [PATCH 1/8] gnu: python-oslosphinx: Update to 4.9.0 Danny Milosavljevic
2017-01-17 22:25   ` [PATCH 2/8] gnu: Add python-reno Danny Milosavljevic
2017-01-17 22:36     ` Marius Bakke
2017-01-17 23:42     ` Hartmut Goebel
2017-01-17 22:25   ` [PATCH 3/8] gnu: python-requests: Update to 2.10.0 Danny Milosavljevic
2017-01-17 22:38     ` Marius Bakke
2017-01-17 23:03       ` Danny Milosavljevic
2017-01-17 22:25   ` [PATCH 4/8] gnu: Add python-dulwich Danny Milosavljevic
2017-01-17 22:43     ` Marius Bakke
2017-01-17 22:25   ` [PATCH 5/8] gnu: Add python-geventhttpclient Danny Milosavljevic
2017-01-17 22:48     ` Marius Bakke [this message]
2017-01-17 23:12       ` Danny Milosavljevic
2017-01-17 23:23         ` Marius Bakke
2017-01-17 22:25   ` [PATCH 6/8] gnu: Add python-fastimport Danny Milosavljevic
2017-01-17 22:50     ` Marius Bakke
2017-01-17 22:25   ` [PATCH 7/8] gnu: python-oslosphinx: Add python-reno Danny Milosavljevic
2017-01-17 22:51     ` Marius Bakke
2017-01-17 22:25   ` [PATCH 8/8] gnu: python-dulwich: Fix tests Danny Milosavljevic
2017-01-17 22:55     ` Marius Bakke
2017-01-17 22:58       ` Danny Milosavljevic
2017-01-17 23:38     ` Hartmut Goebel
2017-01-17 22:31   ` [PATCH 0/8] Make python-oslosphinx work in python-tests branch Marius Bakke
2017-01-17 22:46     ` Danny Milosavljevic
2017-01-17 22:56     ` Danny Milosavljevic
2017-01-17 23:17       ` Marius Bakke
2017-01-17 23:28         ` Danny Milosavljevic
2017-01-17 23:46           ` Danny Milosavljevic
2017-01-18  0:18             ` Danny Milosavljevic
2017-01-18  0:07           ` Marius Bakke
2017-01-18  0:32   ` ng0
2017-01-19  9:48     ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760ldb8wa.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me \
    --to=mbakke@fastmail.com \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).