Re: help2man usage with pybuild / debhelper packaging workflow

2016-06-04 Thread Ghislain Vaillant

On 04/06/16 05:25, Paul Wise wrote:

On Sat, Jun 4, 2016 at 12:30 AM, Christian Seiler wrote:


Well, you could add a custom target to debian/rules that calls
help2man for all these scripts - so that you as a maintainer
can refresh the manpages every now and then. (And store them
in debian/ in the packaging.)  That way, you don't break cross
builds (manpages are pre-generated), but still automate it to
a large extent.


I don't think it is ever appropriate to store pre-generated files in
source packages, neither in the upstream tarball nor in the Debian
tarball (except for autotools cruft or VCS metadata through
autorevision).

For Python stuff, it is generally arch all and never needs to be
cross-built so help2man is fine.


That is my case, indeed.


In any case, using something like sphinx and sphinxcontrib-autoprogram
or python3-sphinx-argparse plus manual page source in Markdown or
reStructuredText format is a better way to go since you get a nice
format to write in and automatically sync your --help output with the
manual page.


I like this approach. Any example you may have in mind?

Cheers,
Ghis



Re: help2man usage with pybuild / debhelper packaging workflow

2016-06-04 Thread Paul Wise
On Sat, Jun 4, 2016 at 8:05 PM, Ghislain Vaillant wrote:

> I like this approach. Any example you may have in mind?

Apparently onionbalance uses sphinxcontrib-autoprogram.

I plan to figure out python3-sphinx-argparse at some point for
check-all-the-things.

Another really useful thing to have is automatic bash completion based
on the objects used for --help output. I use python3-argcomplete in
check-all-the-things for that (see git master).

-- 
bye,
pabs

https://wiki.debian.org/PaulWise