-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to distribute man page with package? #72
Comments
I'm not sure that there is a great answer for this right now, nor am I sure how we'd support it in a cross platform way. It's a good question though. |
Controversial though, using data_files are a common way at present like: |
This is same problem for completion scripts. I have a discussion for completion scripts at: |
Finally, we did like this. https://github.com/wkentaro/wstool/blob/68003a95c2bde7b26101a9621de814ff82a73b64/setup.py |
Sphinx can build man pages: http://sphinx-doc.org/man/sphinx-build.html?highlight=command%20line This is good because it can be wholly consistent with your HTML docs and module docstrings. That said, I'm not sure what the workflow is to build the pages and distribute them, or to distribute the documentation and build it on install... |
Yeah, I was tried that here. 2015年10月1日木曜日、Leo [email protected]さんは書きました:
和田 健太郎 / Kentaro Wada |
This is how I add man/info pages (generated by Sphinx). This is added to the
|
Apologies for appending to such an old issue, but I also struggled with this problem and thought that it might help others trying to do the same. In addition to the manpage generation problem outlined here, I have struggled with installation of the manpages in a place outside of the Python directory when using I was able to solve this by making a small modification to the solution of @wkentaro which again bypasses
Though after looking at this, and seeing how much |
I would suggest if you wish your code to be a system-wide application, installed specifically on some particular linux distribution, which would have some particular location rules where it installs man files, the path of least resistance currently would be to simply include the man files in the project, but use a system package format like deb or rpm to specify how to install them on that system. The basic reason this is hard is because pip does not focus on trying to be able to correctly handle installing packages on a system level. Distutils has tried a little in the past, but obviously where it got to has left very, very much to be desired. |
Yes, I think I've come around to your thinking. It's a shame because using |
Abusing `data_files` seems to be the simplest way of doing this. pypa/packaging-problems#72 (comment)
If the data file way is acceptable to folks, here is Jupyter talking about their new/modern way they distribute extensions with Hatchling using that same concept https://blog.jupyter.org/packaging-for-jupyter-in-2022-c7be64c38926 |
That article doesn’t mention man pages, only the undefined concept of «extensions» — could you point to some doc or code, maybe in their hatch plugin, that would help here? |
You can use the |
I publish a Python package. I'd like it to install a man page. How to do that?
The text was updated successfully, but these errors were encountered: