unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add docopt.
@ 2015-12-03  6:24 Kyle Meyer
  2015-12-03 19:31 ` Leo Famulari
  2015-12-04  9:51 ` [PATCH] gnu: Add docopt Ricardo Wurmus
  0 siblings, 2 replies; 6+ messages in thread
From: Kyle Meyer @ 2015-12-03  6:24 UTC (permalink / raw)
  To: guix-devel; +Cc: Kyle Meyer

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 45222e9..5b31ae8 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5994,3 +5994,29 @@ automatically detect a wide range of file encodings.")
 
 (define-public python2-chardet
   (package-with-python2 python-chardet))
+
+(define-public python-docopt
+  (package
+    (name "python-docopt")
+    (version "0.6.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "docopt" version))
+       (sha256
+        (base32
+         "14f4hn6d1j4b99svwbaji8n2zj58qicyz19mm0x6pmhb50jsics9"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (arguments '(#:tests? #f))   ; Tests are not included in the PyPI release.
+    (home-page "http://docopt.org")
+    (synopsis "Command-line interface description language for Python")
+    (description "This library allows the user to define a command-line
+interface from a program's help message rather than specifying it
+programatically with command-line parsers like @code{getopt} and
+@code{argparse}.")
+    (license license:expat)))
+
+(define-public python2-docopt
+  (package-with-python2 python-docopt))
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: Add docopt.
  2015-12-03  6:24 [PATCH] gnu: Add docopt Kyle Meyer
@ 2015-12-03 19:31 ` Leo Famulari
  2015-12-03 23:17   ` Kyle Meyer
  2015-12-04  9:51 ` [PATCH] gnu: Add docopt Ricardo Wurmus
  1 sibling, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2015-12-03 19:31 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: guix-devel

On Thu, Dec 03, 2015 at 01:24:09AM -0500, Kyle Meyer wrote:
> * gnu/packages/python.scm (python-docopt, python2-docopt): New
>   variables.

Have you tested the software provided by this patch to make sure it
works? I'm not sure how to test it since it's just a library.

> ---
>  gnu/packages/python.scm | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 45222e9..5b31ae8 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -5994,3 +5994,29 @@ automatically detect a wide range of file encodings.")
>  
>  (define-public python2-chardet
>    (package-with-python2 python-chardet))
> +
> +(define-public python-docopt
> +  (package
> +    (name "python-docopt")
> +    (version "0.6.2")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "docopt" version))

Nice, I haven't noticed this before. Looks like a recent addition :)

> +       (sha256
> +        (base32
> +         "14f4hn6d1j4b99svwbaji8n2zj58qicyz19mm0x6pmhb50jsics9"))))
> +    (build-system python-build-system)
> +    (inputs
> +     `(("python-setuptools" ,python-setuptools)))
> +    (arguments '(#:tests? #f))   ; Tests are not included in the PyPI release.

Are there tests in any other releases? If not, I would change the
comment to "No test suite", just to make it more clear. If yes, we
should probably package that release while asking upstream to include
the tests in the PyPi release.

> +    (home-page "http://docopt.org")
> +    (synopsis "Command-line interface description language for Python")
> +    (description "This library allows the user to define a command-line
> +interface from a program's help message rather than specifying it
> +programatically with command-line parsers like @code{getopt} and
> +@code{argparse}.")
> +    (license license:expat)))
> +
> +(define-public python2-docopt
> +  (package-with-python2 python-docopt))
> -- 
> 2.6.2
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: Add docopt.
  2015-12-03 19:31 ` Leo Famulari
@ 2015-12-03 23:17   ` Kyle Meyer
  2015-12-05  7:11     ` [PATCH v2] gnu: Add python-docopt Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Meyer @ 2015-12-03 23:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Thu, Dec 03, 2015 at 01:24:09AM -0500, Kyle Meyer wrote:
>> * gnu/packages/python.scm (python-docopt, python2-docopt): New
>>   variables.
>
> Have you tested the software provided by this patch to make sure it
> works? I'm not sure how to test it since it's just a library.

Yes, I've been using the py3 version locally for a while and haven't
noticed any issues.  I didn't test the py2 version.

>> +    (arguments '(#:tests? #f))   ; Tests are not included in the PyPI release.
>
> Are there tests in any other releases? If not, I would change the
> comment to "No test suite", just to make it more clear. If yes, we
> should probably package that release while asking upstream to include
> the tests in the PyPi release.

There's a test file in the GitHub repo.  I'll open a PR adding it to the
source distribution and change the package definition to use the GitHub
source for now.

Thanks for the feedback.  I'll send an update.

[I also just realized that I put docopt rather than python-docopt in the
commit subject.]

--
Kyle

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: Add docopt.
  2015-12-03  6:24 [PATCH] gnu: Add docopt Kyle Meyer
  2015-12-03 19:31 ` Leo Famulari
@ 2015-12-04  9:51 ` Ricardo Wurmus
  1 sibling, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2015-12-04  9:51 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: guix-devel


> +    (inputs
> +     `(("python-setuptools" ,python-setuptools)))

This probably should be “native-inputs”.

Other than that and Leo’s comment on disabling tests this looks good to
me.  Thank you!

~~ Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] gnu: Add python-docopt.
  2015-12-03 23:17   ` Kyle Meyer
@ 2015-12-05  7:11     ` Kyle Meyer
  2015-12-06 21:40       ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Meyer @ 2015-12-05  7:11 UTC (permalink / raw)
  To: guix-devel; +Cc: Kyle Meyer

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3385393..273486b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015 Erik Edrosa <erik.edrosa@gmail.com>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6006,3 +6007,38 @@ automatically detect a wide range of file encodings.")
 
 (define-public python2-chardet
   (package-with-python2 python-chardet))
+
+(define-public python-docopt
+  (package
+    (name "python-docopt")
+    (version "0.6.2")
+    (source
+     (origin
+       (method url-fetch)
+       ;; The release on PyPI does not include tests.
+       (uri (string-append
+             "https://github.com/docopt/docopt/archive/"
+             version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-setuptools" ,python-setuptools)))
+    (arguments
+     `(#:phases (alist-replace
+                 'check
+                 (lambda _ (zero? (system* "py.test")))
+                 %standard-phases)))
+    (home-page "http://docopt.org")
+    (synopsis "Command-line interface description language for Python")
+    (description "This library allows the user to define a command-line
+interface from a program's help message rather than specifying it
+programatically with command-line parsers like @code{getopt} and
+@code{argparse}.")
+    (license license:expat)))
+
+(define-public python2-docopt
+  (package-with-python2 python-docopt))
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] gnu: Add python-docopt.
  2015-12-05  7:11     ` [PATCH v2] gnu: Add python-docopt Kyle Meyer
@ 2015-12-06 21:40       ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2015-12-06 21:40 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: guix-devel

Kyle Meyer <kyle@kyleam.com> skribis:

> * gnu/packages/python.scm (python-docopt, python2-docopt): New
>   variables.

Applied, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-06 21:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-03  6:24 [PATCH] gnu: Add docopt Kyle Meyer
2015-12-03 19:31 ` Leo Famulari
2015-12-03 23:17   ` Kyle Meyer
2015-12-05  7:11     ` [PATCH v2] gnu: Add python-docopt Kyle Meyer
2015-12-06 21:40       ` Ludovic Courtès
2015-12-04  9:51 ` [PATCH] gnu: Add docopt Ricardo Wurmus

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).