diff mbox series

[bug#37613] gnu: Add python-httpie.

Message ID 20191014114320.fmiev2vxisikagf7@rafflesia
State Accepted
Headers show
Series [bug#37613] gnu: Add python-httpie. | expand

Commit Message

Tanguy LE CARROUR Oct. 14, 2019, 11:43 a.m. UTC
From 13062545e9df7f9cab728f6ee17b572a88a11e31 Mon Sep 17 00:00:00 2001
From: Tanguy Le Carrour <tanguy@bioneland.org>
Date: Fri, 4 Oct 2019 08:44:59 +0200
Subject: [PATCH] gnu: Add python-httpie.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

Comments

Oleg Pykhalov Oct. 17, 2019, 8:13 p.m. UTC | #1
Hello,

Thank you for packaging this tool!

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> From 13062545e9df7f9cab728f6ee17b572a88a11e31 Mon Sep 17 00:00:00 2001
> From: Tanguy Le Carrour <tanguy@bioneland.org>
> Date: Fri, 4 Oct 2019 08:44:59 +0200
> Subject: [PATCH] gnu: Add python-httpie.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> * gnu/packages/python-web.scm (python-httpie): New public variable.
> ---
>  gnu/packages/python-web.scm | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
> index ffef3319f7..b980b83a70 100644
> --- a/gnu/packages/python-web.scm
> +++ b/gnu/packages/python-web.scm
> @@ -30,6 +30,7 @@
>  ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
>  ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
>  ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
> +;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -303,6 +304,34 @@ other HTTP libraries.")
>  (define-public python2-httplib2
>    (package-with-python2 python-httplib2))
>  
> +(define-public python-httpie
> +  (package
> +    (name "python-httpie")

[…]

LGTM.  

What do you think about naming the package “httpie” instead, because
it's intended to run by calling ‘httpie’ command as in ‘youtube-dl’
package?  I could change the name if you don't mind and push it.

Regards,
Oleg.
Tanguy LE CARROUR Oct. 18, 2019, 12:50 p.m. UTC | #2
Hi Oleg!


Le 10/17, Oleg Pykhalov a écrit :
> What do you think about naming the package “httpie” instead, because
> it's intended to run by calling ‘httpie’ command as in ‘youtube-dl’
> package?  I could change the name if you don't mind and push it.

I have no opinion on this! I package cookiecutter as
`python-cookiecutter`, so I did the same with httpie.
The only problem is that the binary is actually called `http`.

Just do whatever you think is best!

Should I consider doing the same for the package `python-poetry` I've submitted?!

Regards,
Oleg Pykhalov Oct. 18, 2019, 3:09 p.m. UTC | #3
Tanguy Le Carrour <tanguy@bioneland.org> writes:

> Hi Oleg!
>
>
> Le 10/17, Oleg Pykhalov a écrit :
>> What do you think about naming the package “httpie” instead, because
>> it's intended to run by calling ‘httpie’ command as in ‘youtube-dl’
>> package?  I could change the name if you don't mind and push it.
>
> I have no opinion on this! I package cookiecutter as
> `python-cookiecutter`, so I did the same with httpie.
> The only problem is that the binary is actually called `http`.

Well, ‘http’ as a package name is not good IMO ;-)

httpie as named in Debian and Nix should be good enough.

Pushed to master.

> Should I consider doing the same for the package `python-poetry` I've submitted?!

Yes, just a ‘poetry’.

Thanks,
Oleg.
diff mbox series

Patch

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index ffef3319f7..b980b83a70 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -30,6 +30,7 @@ 
 ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
 ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -303,6 +304,34 @@  other HTTP libraries.")
 (define-public python2-httplib2
   (package-with-python2 python-httplib2))
 
+(define-public python-httpie
+  (package
+    (name "python-httpie")
+    (version "1.0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "httpie" version))
+       (sha256
+        (base32
+         "103fcigpxf4nqmrdqjnyz7d9n4n16906slwmmqqc0gkxv8hnw6vd"))))
+    (build-system python-build-system)
+    (arguments
+     ;; The tests attempt to access external web servers, so we cannot run them.
+     '(#:tests? #f))
+    (propagated-inputs
+     `(("python-colorama" ,python-colorama)
+       ("python-pygments" ,python-pygments)
+       ("python-requests" ,python-requests)))
+    (home-page "https://httpie.org/")
+    (synopsis "cURL-like tool for humans")
+    (description
+     "A command line HTTP client with an intuitive UI, JSON support,
+syntax highlighting, wget-like downloads, plugins, and more.  It consists of
+a single http command designed for painless debugging and interaction with
+HTTP servers, RESTful APIs, and web services.")
+    (license license:bsd-3)))
+
 (define-public python-html2text
   (package
     (name "python-html2text")