2

I am trying to publish documentation on pythonhosted.org using setuptools, but while python setup.py upload_docs succeeds, nothing changes online, and no update of the documentation is reported in my package's journal on PyPI either.

Yet, I can still manually upload a ZIP file using the PyPI web interface, and this works just fine.

I used to build and deploy the documentation with MkDocs using:

$ mkdocs build --clean
$ python setup.py upload_docs

None of them reports any error. The new website is properly generated and can be served locally by MkDocs.

I tried Python 3.4.2, 3.5 and 3.6, as well as with several versions of setuptools. I must be missing something obvious.

Below is the output of the upload_docs command (with debug info). Note that the content of the website is stored under "./site", as detected. See also my project configuration, especially setup.py and 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

Thanks in advance for any help.

fchauvel
  • 763
  • 1
  • 6
  • 14

1 Answers1

1

None of them reports any error.

Technically true, but you appear to be ignoring a simple warning. From your output:

Upload_docs command is deprecated. Use RTD instead.

The “deprecated” part is clear enough: this command is no longer recommended for use.

The “Use RTD instead” part is unclear, I grant you. It should be more explicit: it is referring you to the Read the Docs service.

This is because there is a (poorly documented as of 2017-04-05) plan to remove the PyPI documentation hosting service.

bignose
  • 30,281
  • 14
  • 77
  • 110
  • This doesn't really answer the question. It doesn't make sense that the API returns 200 on upload if that was really disabled. And it doesn't seem to be disabled as it still works with the web form upload. – letmaik Jun 07 '17 at 19:38
  • @letmaik, who's saying the API is [disabled](https://en.wiktionary.org/wiki/disable)? Not me, and not the warning. Instead, you're being told the API is [deprecated](https://en.wiktionary.org/wiki/deprecate). The announcement (linked in the answer) is a *plan to* remove the service, some time in the future. – bignose Jun 08 '17 at 01:21
  • Nobody said it's disabled, but you seem to imply it in your answer, otherwise I don't know how the answer relates to the question. The specific issue was that the pages don't update after successfully uploading them with upload_docs. – letmaik Jun 08 '17 at 07:57