From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH 5/5] gnu: python-acme: Generate and install documentation. Date: Thu, 18 Feb 2016 13:51:40 +0100 Message-ID: References: <482da9ee97c7605e078a3e089a6c475c72570a34.1455767577.git.leo@famulari.name> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWO3l-0003IG-1A for guix-devel@gnu.org; Thu, 18 Feb 2016 07:51:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWO3g-0006dg-WB for guix-devel@gnu.org; Thu, 18 Feb 2016 07:51:52 -0500 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:55350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWO3g-0006dU-JY for guix-devel@gnu.org; Thu, 18 Feb 2016 07:51:48 -0500 In-Reply-To: <482da9ee97c7605e078a3e089a6c475c72570a34.1455767577.git.leo@famulari.name> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Leo Famulari Cc: guix-devel@gnu.org Leo Famulari writes: > * gnu/packages/tls.scm (acme)[arguments]: Add 'docs' phase. > [native-inputs]: Add python-sphinx, python-sphinxcontrib-programoutput, > python-sphinx-rtd-theme, python-setuptools, texinfo. > --- > gnu/packages/tls.scm | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm > index 00d4805..dc6f9b4 100644 > --- a/gnu/packages/tls.scm > +++ b/gnu/packages/tls.scm > @@ -340,11 +340,24 @@ security, and applying best practice development = processes.") > (display "\n[easy_install]\nzip_ok =3D 0\n" > port) > (close-port port) > - #t)))))) > - ;; TODO: Add optional inputs for testing and building documentatio= n. > + #t))) > + (add-after 'install 'docs > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (man (string-append out "/share/man/man1")) > + (info (string-append out "/info"))) > + (and (zero? (system* "make" "-C" "docs" "man" "info")) > + (install-file "docs/_build/texinfo/acme-python.inf= o" info) > + (install-file "docs/_build/man/acme-python.1" man)= ))))))) =E2=80=9Cinstall-file=E2=80=9D calls =E2=80=9Ccopy-file=E2=80=9D last and= according to the Guile manual the return value of =E2=80=9Ccopy-file=E2=80=9D is unspecified. In pract= ise this is not #f, of course, so all the three arguments to =E2=80=9C(and ...)=E2=80=9D = will be evaluated as long as =E2=80=9Cmake=E2=80=9D does not fail. However, =E2=80=9Cand=E2=80=9D just returns the return value of its last = argument (unless one of the arguments evaluates to =E2=80=9C#f=E2=80=9D), which is= unspecified, not =E2=80=9C#t=E2=80=9D. As we want successful phases to return =E2=80=9C= #t=E2=80=9D you could explicitly add =E2=80=9C#t=E2=80=9D as a fourth argument to =E2=80=9C(and= ...)=E2=80=9D. Not sure if that=E2=80=99s really necessary, but you did ask for comments= about your use of =E2=80=9Cand=E2=80=9D... :) ~~ Ricardo