From: Tomi Ollila Date: Sat, 12 Jul 2014 08:00:52 +0000 (+0300) Subject: Re: [PATCH v2 1/5] doc: Allow rst2man.py as an alternative to rst2man X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=96f3eda9b67e891d8c9435114060a40aa029b289;p=notmuch-archives.git Re: [PATCH v2 1/5] doc: Allow rst2man.py as an alternative to rst2man --- diff --git a/0c/6c06b88d875c190e7a51392c3ccd866f035bcf b/0c/6c06b88d875c190e7a51392c3ccd866f035bcf new file mode 100644 index 000000000..f3620c88c --- /dev/null +++ b/0c/6c06b88d875c190e7a51392c3ccd866f035bcf @@ -0,0 +1,128 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 36490431FBD + for ; Sat, 12 Jul 2014 01:01:04 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Qj0PQvcKcCyS for ; + Sat, 12 Jul 2014 01:01:00 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id A4521431FBC + for ; Sat, 12 Jul 2014 01:01:00 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id A6FAC10008F; + Sat, 12 Jul 2014 11:00:52 +0300 (EEST) +From: Tomi Ollila +To: "W. Trevor King" , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 1/5] doc: Allow rst2man.py as an alternative to rst2man +In-Reply-To: + +References: + +User-Agent: Notmuch/0.18.1+25~gdaf4b6f (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 12 Jul 2014 08:01:04 -0000 + +On Sat, May 10 2014, "W. Trevor King" wrote: + +> Gentoo's dev-python/docutils-0.10 installs Docutils scripts with a +> *.py extension, so I have /usr/bin/rst2man.py and no rst2man script. +> This patch supports users with both types of systems by checking for +> rst2man, falling back on rst2man.py, and giving up only if neither is +> found. Users can also set the new RST2MAN path variable explicitly +> when they call Make: +> +> make RST2MAN=/my/custom/rst_to_man_converter build-man +> +> I use POSIX's 'command -v' [1] to find the path to rst2man or +> rst2man.py, and save that as RST2MAN in Makefile.config. Then pass +> the configured RST2MAN path through to prerst2man.py to use in its +> system call. + +The comment block above can be removed if the change I suggest below will +be done... + +> +> We can use a non-empty RST2MAN to check for the availability of an +> rst2man program, so there's no need for a separate HAVE_RST2MAN. +> However, we keep the existing HAVE_RST2MAN for consistency with +> HAVE_SPHINX. +> +> [1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html + +ditto + +> --- +> configure | 15 +++++++++++++-- +> doc/Makefile.local | 2 +- +> doc/prerst2man.py | 9 +++++---- +> 3 files changed, 19 insertions(+), 7 deletions(-) +> +> diff --git a/configure b/configure +> index 9bde2eb..f017af8 100755 +> --- a/configure +> +++ b/configure +> @@ -413,17 +413,24 @@ if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > /dev +> printf "Yes.\n" +> have_sphinx=1 +> have_rst2man=0 +> + RST2MAN= +> else +> printf "No (falling back to rst2man).\n" +> have_sphinx=0 +> +> printf "Checking if rst2man is available... " +> if rst2man -V > /dev/null 2>&1; then +> - printf "Yes.\n" +> have_rst2man=1 +> + RST2MAN=$(command -v rst2man) + +This could be just RST2MAN=rst2man -- for consistency -- otherwise we'd +need to give the same treatment to all other commands we check... + + +> + printf "Yes (${RST2MAN}).\n" +> + elif rst2man.py -V > /dev/null 2>&1; then +> + have_rst2man=1 +> + RST2MAN=$(command -v rst2man.py) + +Ditto, RST2MAN=rst2man.py + + +> + printf "Yes (${RST2MAN}).\n" +> else +> - printf "No (so will not install man pages).\n" +> have_rst2man=0 +> + RST2MAN= +> + printf "No (so will not install man pages).\n" +> fi +> fi + +Tomi