-
Notifications
You must be signed in to change notification settings - Fork 12
Replace setuptools command to build manpages #758
Description
#752 transitions away from setuptools.
This requires a new approach to build the manpages as part of the release/installation process.
Initially, I thought this could be a hatch build hook: https://hatch.pypa.io/latest/plugins/build-hook/custom/
However, of the two manpage flavors we have, we need one for building the docs, and one to install on systems that can handle manpages.
One could argue that it should be the task of a CLI package to provide this functionality. Thinking more, I believe that it cannot be anywhere other than in a CLI package, because the CLI interface will depend on the CLI frontend. Generating manpages in library packages requires either to make assumptions about what a CLI does and supports. This should be avoided.
Actual generation should be factored out of the setuptools framework and into a script that can handle the command suite entrypoints directly -- this is what is happening inside.
Given all requirements, the seemingly only approach is to generate manpage on-demand (either in user-space or in a package's post-install hook).