praiskup / argparse-manpage

Automatically build man-pages for your Python project
Apache License 2.0
40 stars 22 forks source link

Documentation seems slightly wrong for using build_manpages #31

Closed rrthomas closed 2 years ago

rrthomas commented 3 years ago

Thanks for argparse-manpage!

I installed it with pip, then attempted to follow the example. It didn't quite work; in particular I had to write:

from build_manpages.build_manpages import get_install_cmd

As get_install_cmd is not exported in __init__.py. Perhaps you could fix either the code or the docs so that the example code works?

praiskup commented 3 years ago

The instructions describe the git-submodule use-case. Ie we don'ŧ know in advance where the module resides. See:

Download ./build_manpages directory and place it somewhere where Python can find it. E.g. by:

Are you easily able to specify the argparse-manpage build dependency for PyPI? Or don't you plan to distribute using PyPI?

praiskup commented 3 years ago

I am asking because - if it was possible - I'd prefer to rewrite the documentation towards using argparse-manpage from pip (instead of from git submodule).

rrthomas commented 3 years ago

I can specify the build dep for PyPI I think, that's fine. I agree it would be more logical to have the documentation written from that point of view!

praiskup commented 3 years ago

Can you share your example setup.py, once it builds in PyPI then? I'd use your polished pattern in docs. There definitely must be some import-fallback when the argparse-manpage is not yet installed on pypi builder.

rrthomas commented 3 years ago

Sure, see https://github.com/rrthomas/rpl. The project is uploaded to https://test.pypi.org/project/rpl/1.7.2/ (I am negotiating to be able to use the name for the main PyPI).

praiskup commented 3 years ago

.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.

The rpl.1 man page installed from testing PyPI though doesn't look like a generated variant by argparse-manpage?

rrthomas commented 3 years ago

That's right. I use argparse-manpage to install the man page, not to generate it.

rrthomas commented 2 years ago

Thanks for this!