unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
@ 2016-06-22 13:00 Danny Milosavljevic
  2016-06-25 18:17 ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2016-06-22 13:00 UTC (permalink / raw)
  To: guix-devel


* gnu/packages/python.scm (python-prompt-toolkit, python2-prompt-toolkit): 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 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)))))

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

* Re: [PATCH] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
  2016-06-22 13:00 [PATCH] gnu: Add python-prompt-toolkit, python2-prompt-toolkit Danny Milosavljevic
@ 2016-06-25 18:17 ` Leo Famulari
  2016-06-28  8:19   ` [PATCH v2] " Danny Milosavljevic
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-06-25 18:17 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

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.

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

* [PATCH v2] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
  2016-06-25 18:17 ` Leo Famulari
@ 2016-06-28  8:19   ` Danny Milosavljevic
  2016-06-29  7:40     ` [PATCH v3] " Danny Milosavljevic
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2016-06-28  8:19 UTC (permalink / raw)
  To: guix-devel

---
 gnu/packages/python.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5322be5..6103606 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9664,3 +9664,40 @@ implementation for Python.")
        `(("python2-ipaddress" ,python2-ipaddress)
          ,@(package-propagated-inputs base))))))
 
+(define-public python-prompt-toolkit
+ (package
+  (name "python-prompt-toolkit")
+  (version "1.0.3")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "https://pypi.python.org/packages/"
+             "8d/de/412f23919929c01e6b55183e124623f705e4b91796d3d2dce2cb53d595ad/"
+             "prompt_toolkit-" version ".tar.gz"))
+      (sha256
+        (base32
+          "18lbmmkyjf509klc3217lq0x863pfzix779zx5kp9lms1iph4pl0"))))
+  (build-system python-build-system)
+  (inputs `(("python-wcwidth" ,python-wcwidth)
+            ("python-pygments" ,python-pygments)))
+  (native-inputs `(("python-six" ,python-six)))
+  (home-page
+    "https://github.com/jonathanslenders/python-prompt-toolkit")
+  (synopsis
+    "Library for building command line interfaces in Python")
+  (description
+    "Prompt-Toolkit is a library for building interactive command line interfaces 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-3)))
+
+(define-public python2-prompt-toolkit
+  (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
+    (package
+      (inherit base)
+      (propagated-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-propagated-inputs base))))))

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

* [PATCH v3] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
  2016-06-28  8:19   ` [PATCH v2] " Danny Milosavljevic
@ 2016-06-29  7:40     ` Danny Milosavljevic
  2016-06-29  9:30       ` Danny Milosavljevic
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2016-06-29  7:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-prompt-toolkit, python2-prompt-toolkit): New variables.

Signed-off-by: Danny Milosavljevic <dannym+a@scratchpost.org>
---
 gnu/packages/python.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d295467..145e453 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9663,3 +9663,41 @@ implementation for Python.")
       (propagated-inputs
        `(("python2-ipaddress" ,python2-ipaddress)
          ,@(package-propagated-inputs base))))))
+
+(define-public python-prompt-toolkit
+ (package
+  (name "python-prompt-toolkit")
+  (version "1.0.3")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "https://pypi.python.org/packages/"
+             "8d/de/412f23919929c01e6b55183e124623f705e4b91796d3d2dce2cb53d595ad/"
+             "prompt_toolkit-" version ".tar.gz"))
+      (sha256
+        (base32
+          "18lbmmkyjf509klc3217lq0x863pfzix779zx5kp9lms1iph4pl0"))))
+  (build-system python-build-system)
+  (inputs `(("python-wcwidth" ,python-wcwidth)
+            ("python-pygments" ,python-pygments)))
+  (native-inputs `(("python-six" ,python-six)))
+  (home-page
+    "https://github.com/jonathanslenders/python-prompt-toolkit")
+  (synopsis
+    "Library for building command line interfaces in Python")
+  (description
+    "Prompt-Toolkit is a library for building interactive command line interfaces 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-3)))
+
+(define-public python2-prompt-toolkit
+  (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))

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

* Re: [PATCH v3] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
  2016-06-29  7:40     ` [PATCH v3] " Danny Milosavljevic
@ 2016-06-29  9:30       ` Danny Milosavljevic
  2016-06-30  2:23         ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2016-06-29  9:30 UTC (permalink / raw)
  Cc: guix-devel

On Wed, 29 Jun 2016 09:40:40 +0200
Danny Milosavljevic <dannym+a@scratchpost.org> wrote:

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


Hmm. Now that I made it a native input instead of propagated input, the python2-wcwidth that is compiled alongside python2-prompt-toolkit doesn't find setuptools anymore. Why?

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

* Re: [PATCH v3] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
  2016-06-29  9:30       ` Danny Milosavljevic
@ 2016-06-30  2:23         ` Leo Famulari
  2016-07-06  8:52           ` Danny Milosavljevic
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Famulari @ 2016-06-30  2:23 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Wed, Jun 29, 2016 at 11:30:33AM +0200, Danny Milosavljevic wrote:
> On Wed, 29 Jun 2016 09:40:40 +0200
> Danny Milosavljevic <dannym+a@scratchpost.org> wrote:
> 
> > +(define-public python2-prompt-toolkit
> > +  (let ((base (package-with-python2 (strip-python2-variant python-prompt-toolkit))))
> > +    (package
> > +      (inherit base)
> > +      (native-inputs
> > +       `(("python2-setuptools" ,python2-setuptools)
> > +         ,@(package-native-inputs base))))))
> 
> 
> Hmm. Now that I made it a native input instead of propagated input, the python2-wcwidth that is compiled alongside python2-prompt-toolkit doesn't find setuptools anymore. Why?

In python-wcwidth and python-prompt-toolkit, the 'properties' field that
makes the python2-variant system work is missing. I missed that in my
review of python-wcwidth.

I'll push a follow up to that commit, and then push this patch with the
properties field added as well.

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

* Re: [PATCH v3] gnu: Add python-prompt-toolkit, python2-prompt-toolkit.
  2016-06-30  2:23         ` Leo Famulari
@ 2016-07-06  8:52           ` Danny Milosavljevic
  0 siblings, 0 replies; 7+ messages in thread
From: Danny Milosavljevic @ 2016-07-06  8:52 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

I can confirm that adding

  (properties `((python2-variant . ,(delay python2-prompt-toolkit))))

and 

  (properties `((python2-variant . ,(delay python2-wcwidth))))

, respectively, makes python2-prompt-toolkit work for Python 2 as well.

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

end of thread, other threads:[~2016-07-06  8:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-22 13:00 [PATCH] gnu: Add python-prompt-toolkit, python2-prompt-toolkit Danny Milosavljevic
2016-06-25 18:17 ` Leo Famulari
2016-06-28  8:19   ` [PATCH v2] " Danny Milosavljevic
2016-06-29  7:40     ` [PATCH v3] " Danny Milosavljevic
2016-06-29  9:30       ` Danny Milosavljevic
2016-06-30  2:23         ` Leo Famulari
2016-07-06  8:52           ` Danny Milosavljevic

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