wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
6.03k stars 603 forks source link

Include man pages in PyPI package tarballs? #1234

Closed vergenzt closed 8 months ago

vergenzt commented 8 months ago

Hi - would you be open to the man pages being included in the built barballs distributed to PyPI?

Followup from #15, #1104

My ultimate goal is for the man pages to be accessible. I find myself regularly frustrated when using csvkit because I can't quickly lookup the man page for a command without clearing out my current shell pipeline to call <tool> --help. (My shell has a keyboard shortcut to pull up the man page for the command under cursor without clearing the command buffer.)

I do agree with your previous sentiment that the maintainers of this package cannot be responsible for making sure the man pages end up in the right place. However I think it would be reasonable for this package to be responsible for building its man pages. Could this package's build script(s) generate the man pages and include them in tarballs uploaded to PyPI? That would greatly simplify distribution maintainers' jobs from "python -m venv .venv && .venv/bin/pip install docs/requirements.txt && PATH=.venv/bin:$PATH make -C docs man && cp docs/_build/man/* ..." (which, to my knowledge, no one does currently because it's non-trivial) to simply "cp docs/_build/man/* ..." (which would be very easy to add).

Would you be open to reviewing & merging a PR to this effect?

jpmckinney commented 8 months ago

Thank you!

vergenzt commented 8 months ago

When do you think a release which includes #1235 could be cut? I'd love to update https://github.com/Homebrew/homebrew-core/blob/master/Formula/c/csvkit.rb to install these whenever that happens. 🙂

jpmckinney commented 8 months ago

It's now tagged! I also added a mention of the Homebrew installation option to the docs :)

vergenzt commented 8 months ago

Awesome! Thanks! 🙂 Unfortunately it turned out my change only got the manual pages included in _sdist_s and not in wheels (the latter of which are the default for installs). Filed #1236 to resolve this! THEN I can finally update the Homebrew formula!

vergenzt commented 1 month ago

PR to link the man pages in Homebrew formula is here: https://github.com/Homebrew/homebrew-core/pull/192380