conjure-cp / conjure

Conjure: The Automated Constraint Modelling Tool
Other
96 stars 20 forks source link

upgrade to Sphinx-5.x and document requirements #530

Closed ott2 closed 1 year ago

ott2 commented 2 years ago

As documented in issue #523 the documentation currently may fail to build on recent systems. The automated build testing system and the system used by readthedocs.org seem to be using an older version Sphinx-2.x rather than current Sphinx-5.x so this isn't necessarily obvious to most people, but will likely become a problem if either or both of these systems upgrade to a more recent toolchain.

Here I have documented the minimal pip3 command needed, and mentioned the TeX requirements, also fixing the incompatibility in conf.py which prevented make docs working: in Sphinx-3.x the add_lexer API changed to require a class rather than a function.

I think this should still work on a reasonably recent Sphinx-2.x toolchain as the API apparently allowed both calling conventions during that era. In particular, I'm hoping that readthedocs.org and the build test systems continue working. However, I haven't tested with an older Sphinx as I haven't been able to establish the precise older versions it implicitly needs. After a couple of hours trying I gave up on trying to get Sphinx-2.x working on Python 3.10.