From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH] gnu: Build and install xonsh docs. Date: Fri, 7 Oct 2016 12:38:21 +0200 Message-ID: <20161007103821.25844-1-dannym@scratchpost.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSXx-0002Wt-KL for guix-devel@gnu.org; Fri, 07 Oct 2016 06:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsSXs-0005z4-Is for guix-devel@gnu.org; Fri, 07 Oct 2016 06:38:33 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSXs-0005ym-C5 for guix-devel@gnu.org; Fri, 07 Oct 2016 06:38:28 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/shells.scm (xonsh): Changed. --- gnu/packages/shells.scm | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 6d510c2..99d1f3e 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -291,10 +291,11 @@ ksh, and tcsh.") (source (origin (method url-fetch) - (uri (pypi-uri "xonsh" version)) + (uri (string-append "https://github.com/xonsh/xonsh/archive/" + version ".tar.gz")) (sha256 (base32 - "0byxd9kjl99q2pyvjh9jy18l0di1i35wr0qqgnw4i6jh6ig3zcki")) + "0v0l3bpyxh2fyhybycjr22sh9v0ggswgmbm9gsyf7yvkrcr5fqzr")) (modules '((guix build utils))) (snippet `(begin @@ -304,8 +305,30 @@ ksh, and tcsh.") (("'xonsh\\.ply',") "")) #t)))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'build 'build-docs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Make it find "xonsh" module + (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH"))) + (zero? (system* "make" "-C" "docs" "html"))))) + (add-after 'install 'install-docs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (docout (string-append out "/share/doc/xonsh"))) + (mkdir-p docout) + (copy-recursively "docs/_build/html" docout))))))) + (native-inputs + `(("python-numpydoc" ,python-numpydoc) + ("python-sphinx" ,python-sphinx) + ("python-sphinx-cloud-sptheme" + ,python-sphinx-cloud-sptheme))) (inputs - `(("python-ply" ,python-ply))) + ;; TODO jupyter distro + `(("python-ply" ,python-ply) + ("python-prompt-toolkit" ,python-prompt-toolkit))) (home-page "http://xon.sh/") (synopsis "Python-ish shell") (description