Patchwork gnu: Add inputs for xonsh.

login
register
mail settings
Submitter Leo Famulari
Date Sept. 29, 2016, 4:44 p.m.
Message ID <20160929164424.GA22100@jasmine>
Download mbox | patch
Permalink /patch/16151/
State New
Headers show

Comments

Leo Famulari - Sept. 29, 2016, 4:44 p.m.
On Thu, Sep 29, 2016 at 12:50:16PM +0200, Danny Milosavljevic wrote:
> * gnu/packages/shells.scm (xonsh): Add inputs.

>            (base32
> -            "0byxd9kjl99q2pyvjh9jy18l0di1i35wr0qqgnw4i6jh6ig3zcki"))))
> +            "0byxd9kjl99q2pyvjh9jy18l0di1i35wr0qqgnw4i6jh6ig3zcki"))
> +        (modules '((guix build utils)))
> +        (snippet
> +         `(begin
> +            ;; Delete bundled ply.
> +            (delete-file-recursively "xonsh/ply")
> +            (substitute* '("setup.py")
> +              (("'xonsh\\.ply',") ""))
> +            #t))))
>      (build-system python-build-system)
> +    (native-inputs
> +     `(("python-numpydoc" ,python-numpydoc)))
> +    (inputs
> +      ;; TODO jupyter distro cloud Sphinx-Theme
> +     `(("python-ply" ,python-ply)
> +       ("python-sphinx" ,python-sphinx)
> +       ("python-prompt-toolkit" ,python-prompt-toolkit)))

I think this should be two commits. What do you think of the patches I
attached?
From b51f7cbba85caf8ca8376762fb6e8d0578056f08 Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@scratchpost.org>
Date: Thu, 29 Sep 2016 12:39:42 -0400
Subject: [PATCH 1/2] gnu: xonsh: Remove bundled PLY.

* gnu/packages/shells.scm (xonsh)[source]: Add snippet to remove bundled
python-ply.
[inputs]: Add python-ply.

Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/shells.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
Danny Milosavljevic - Sept. 29, 2016, 7:08 p.m.
> I think this should be two commits. What do you think of the patches I
> attached?

LGTM!
Danny Milosavljevic - Sept. 29, 2016, 7:39 p.m.
Oops, I don't think the xonsh tarball contains the docs. In which case we need neither sphinx nor numpydoc.

Strange, does it have online-only docs? Or do we need another tarball?
Leo Famulari - Sept. 29, 2016, 9:10 p.m.
On Thu, Sep 29, 2016 at 09:39:58PM +0200, Danny Milosavljevic wrote:
> Oops, I don't think the xonsh tarball contains the docs. In which case we need neither sphinx nor numpydoc.
> 
> Strange, does it have online-only docs? Or do we need another tarball?

It turns out the GitHub tarball does include the docs. I think we should
use that source and add a 'docs' phase as in the certbot package
definition [0].

Can you also ask upstream if they meant to leave the docs out of the
PyPi download?

Too bad the docs Makefile doesn't have a target for info or man pages. I
guess that's a "bonus" goal :)

[0]
http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/tls.scm#n524
Leo Famulari - Sept. 29, 2016, 9:13 p.m.
On Thu, Sep 29, 2016 at 09:08:08PM +0200, Danny Milosavljevic wrote:
> > I think this should be two commits. What do you think of the patches I
> > attached?
> 
> LGTM!

Okay, I pushed the "unbundle ply" patch as cfb7e269e9d.

Patch

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index c165f99..cbf5b42 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -281,8 +281,19 @@  ksh, and tcsh.")
         (uri (pypi-uri "xonsh" version))
         (sha256
           (base32
-            "0byxd9kjl99q2pyvjh9jy18l0di1i35wr0qqgnw4i6jh6ig3zcki"))))
+            "0byxd9kjl99q2pyvjh9jy18l0di1i35wr0qqgnw4i6jh6ig3zcki"))
+        (modules '((guix build utils)))
+        (snippet
+         `(begin
+            ;; Delete bundled ply.
+            (delete-file-recursively "xonsh/ply")
+            (substitute* '("setup.py")
+              (("'xonsh\\.ply',") ""))
+            #t))))
     (build-system python-build-system)
+    (inputs
+      ;; TODO jupyter distro cloud Sphinx-Theme
+     `(("python-ply" ,python-ply)))
     (home-page "http://xon.sh/")
     (synopsis "Python-ish shell")
     (description