Python pip - 安装包的文档?
有没有办法为使用 pip 安装的软件包安装/生成文档?
我希望安装项目所需的所有包以及所有相关文档(例如安装 django 时的 Django 文档、带有 dateutil 的 dateutil 文档等)。
Pip 需求文件是快速安装项目所需包的好方法,但如果我也可以安装所有相关文档,那就更好了。
Ubuntu Python 包将文档安装到 /usr/share/docs,但 pip 似乎没有执行相同的操作。
当我需要离线处理项目时,这些包的文档对我来说很重要。
Is there a way to install/generate the documentation for the packages installed using pip?
I wish to install all the required packages for a project, as well as all the associated documentation (e.g. Django documentation when installing django, dateutil documentation with dateutil etc.).
Pip requirements files are a great way of quickly installing the required packages for a project, but it would be even better if I could also install all the associated docs as well.
Ubuntu Python packages install documentation to /usr/share/docs, but pip does not appear to do the same.
Documentation for these packages is important to me for when I need to work on projects offline.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在寻找与 ruby 自动(除非被抑制)从已安装的 gems/packages 生成 rdoc 的方式等效的方法。
在Python中,有一种用文档注释代码的标准化机制——文档字符串,具有可选格式 >。然而,没有一种从 python 代码生成/存储文档的标准化方法。每个 python 包可能有不同的机制,因此 pip 无法生成它。
I think you're looking for an equivalent to the way that ruby automatically (unless suppressed) generates rdoc from installed gems/packages.
In python, there is a standardized mechanism for annotating code with documentation -- docstrings with optional formatting. However there isn't a standardized way of generating/storing documentation from python code. Each python package may have a different mechanism, so there couldn't be a way for pip to generate it.