diff mbox

gnu: Add python-prompt-toolkit, python2-prompt-toolkit.

Message ID 20160622150031.00fa9615@scratchpost.org
State New
Headers show

Commit Message

Danny Milosavljevic June 22, 2016, 1 p.m. UTC
* gnu/packages/python.scm (python-prompt-toolkit, python2-prompt-toolkit): New variables.
---
 gnu/packages/python.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

Leo Famulari June 25, 2016, 6:17 p.m. UTC | #1
On Wed, Jun 22, 2016 at 03:00:31PM +0200, Danny Milosavljevic wrote:
> * gnu/packages/python.scm (python-prompt-toolkit, python2-prompt-toolkit): New variables.

Thanks! Can you rebase the patch on the current master branch? There
have been changes in python.scm and the patch no longer applies.

> +(define-public python-prompt-toolkit
> + (package
> +  (name "python-prompt-toolkit")
> +  (version "1.0.0")

Why not use the latest release, 1.0.3?

> +  (inputs `(("python-six" ,python-six) ; for the tests

Dependencies used only for the test suite should be native-inputs.

> +  (synopsis
> +    "Library for building powerful interactive command lines in Python")

How about "Library for building command line interfaces in Python"? Or
did I misunderstand the meaning of "command lines"? Either way, we don't
need to describe them as "powerful".

> +  (description
> +    "Prompt-Toolkit is a library for building powerful interactive command lines in Python. 

Again, as above?

> +  (license bsd-2))) ; FIXME which BSD

Any progress on this?

> +
> +(define-public python2-prompt-toolkit
> +  (package
> +    (inherit (package-with-python2
> +              (strip-python2-variant python-prompt-toolkit)))
> +    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))

If python-six becomes a native-input, we'll need to make sure we don't
clobber the inherited native-inputs here. Check python2-orator for an
example.
diff mbox

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4f18680..d1bb862 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9216,3 +9216,39 @@  specified in POSIX.1-2001 and POSIX.1-2008.")
     (inherit (package-with-python2
               (strip-python2-variant python-wcwidth)))
     (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+
+(define-public python-prompt-toolkit
+ (package
+  (name "python-prompt-toolkit")
+  (version "1.0.0")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "https://pypi.python.org/packages/"
+             "0b/2c/ab26db81e5b9c2f179a2e9d797f2ce0d11f7cc3308830831de0daad8629e/"
+             "prompt_toolkit-" version ".tar.gz"))
+      (sha256
+        (base32
+          "192fyzs0hyq0k7wxxl00jwl334l5hwwmdflhvjqqrlj0dsgfs22i"))))
+  (build-system python-build-system)
+  (inputs `(("python-six" ,python-six) ; for the tests
+            ("python-wcwidth" ,python-wcwidth)
+            ("python-pygments" ,python-pygments)))
+  (home-page
+    "https://github.com/jonathanslenders/python-prompt-toolkit")
+  (synopsis
+    "Library for building powerful interactive command lines in Python")
+  (description
+    "Prompt-Toolkit is a library for building powerful interactive command lines in Python. 
+It's like GNU Readline but also features syntax highlighting while typing,
+out-of-the-box multi-line input editing, advanced code completion, incremental search,
+it works properly with Chinese double-width characters, it has mouse support,
+auto suggestions etc.")
+  (license bsd-2))) ; FIXME which BSD
+
+(define-public python2-prompt-toolkit
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-prompt-toolkit)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))