praiskup / argparse-manpage

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

Pre-written manpages need to be added manually to `MANIFEST.in` #93

Open rrthomas opened 1 year ago

rrthomas commented 1 year ago

When a man page is specified with manfile, it does not seem to be automatically added to the manifest.

I'm a bit puzzled here on two counts:

  1. I do not in fact have this problem locally. When I run python -m build, or tox on my package, the hand-written man page is added to the dist package. However, in my package's GitHub CI build, the file does not get added if I don't specify it in MANIFEST.in. See https://github.com/rrthomas/psutils/actions/runs/5039682138/jobs/9037985492 for a failed build.
  2. Presumably there is some way that one adds files to the manifest. After search both argparse-manpage's source code and the internet, I cannot discover how this is done! (Since the manfile option is my code, I would like to fix it!)
praiskup commented 1 year ago

There likely is a way to fix argparse-manpage so it tweaks list of distributed files (i.e. some hook that is callable by dist command). But ATM there's no logic like that. The reason is that until now, we always generated man pages from the python files that already were part of the distributed tarball.

rrthomas commented 1 year ago

Thanks for the explanation! I wish I could work out how the pre-written man page gets into the dist tarball on my system; maybe a question of setuptools version?

In any case, since it's not reliable, and since I don't understand what's going on, I have made a trivial PR to document that manfile files need to be added to MANIFEST.in.