plone.restapi icon indicating copy to clipboard operation
plone.restapi copied to clipboard

Can't build restapi docs locally

Open tisto opened this issue 3 years ago • 2 comments

I tried:

make
➜  plone.restapi git:(blocks_linkintegrity) ✗ make docs-html
cd ./docs/source/ && /Users/timo/workspace/plone/plone.restapi/bin/sphinx-build -b html -d ../_build//doctrees  . ../_build//html
/Users/timo/workspace/plone/plone.restapi/bin/sphinx-build:29: RemovedInSphinx20Warning: `sphinx.main()` has moved to `sphinx.cmd.build.main()`.
  sys.exit(sphinx.main())
Running Sphinx v1.8.5

Exception occurred:
  File "/Users/timo/workspace/plone/plone.restapi/lib/python3.8/site-packages/myst_parser/sphinx_renderer.py", line 21, in <module>
    from sphinx.project import Project
ModuleNotFoundError: No module named 'sphinx.project'
The full traceback has been saved in /var/folders/_0/57n3vm9j04s63yq3twfxx9v00000gn/T/sphinx-err-i91s7nwt.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [docs-html] Error 2

@stevepiercy build the docs locally should still work, right? Do we need to add more setup stuff to our Makefile?

tisto avatar May 04 '22 08:05 tisto

I found and ran:

bin/pip install -r requirements-docs.txt

Though, the original error still persists.

tisto avatar May 04 '22 08:05 tisto

It looks like you had an old virtual environment with Sphinx v1.8.5. Assuming that was the case, make docs-clean would have blown it away, and then make docs-html would recreate everything.

The comments in Makefile are the only documentation we have of it at the moment, but we could add something for developers in plone.restapi.

stevepiercy avatar May 04 '22 09:05 stevepiercy

make docs-html worked for me with a fresh checkout.

davisagli avatar Sep 04 '22 23:09 davisagli