【发布时间】:2017-05-26 08:33:21
【问题描述】:
我正在尝试使用 setuptools 在 pythonhosted.org 上发布文档,但是当 python setup.py upload_docs 成功时,在线没有任何变化,并且我的包的 PyPI 日志中也没有报告文档的更新。
然而,我仍然可以使用 PyPI Web 界面手动上传 ZIP 文件,而且效果很好。
我曾经使用 MkDocs 构建和部署文档:
$ mkdocs build --clean
$ python setup.py upload_docs
它们都没有报告任何错误。新网站已正确生成,可以由 MkDocs 在本地提供服务。
我尝试了 Python 3.4.2、3.5 和 3.6,以及多个版本的 setuptools。我一定遗漏了一些明显的东西。
下面是upload_docs 命令的输出(带有调试信息)。请注意,检测到的网站内容存储在“./site”下。另请参阅我的project configuration,尤其是setup.py 和setup.cfg。
$ python setup.py upload_docs
options (after parsing config files):
options (after parsing command line):
option dict for 'aliases' command:
{}
option dict for 'metadata' command:
{'description_file': ('setup.cfg', 'README.adoc')}
option dict for 'upload_docs' command:
{'upload_dir': ('setup.cfg', 'site')}
running upload_docs
Distribution.get_command_obj(): creating 'upload_docs' command object
setting options for 'upload_docs' command:
upload_dir = site (from setup.cfg)
Upload_docs command is deprecated. Use RTD instead.
Submitting documentation to https://pypi.python.org/pypi/
Server response (200): OK
提前感谢您的帮助。
【问题讨论】:
标签: python upload setuptools static-site