# Suitable versions of Sphinx for building different versions of CMake Docs?

**URL:** https://discourse.cmake.org/t/suitable-versions-of-sphinx-for-building-different-versions-of-cmake-docs/7982
**Category:** Development
**Created:** [April 25, 2023, 5:01pm UTC](https://discourse.cmake.org/t/suitable-versions-of-sphinx-for-building-different-versions-of-cmake-docs/7982 "2023-04-25T17:01:33Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![hwhsu1231](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hwhsu1231/32/5358_2.png) [@hwhsu1231](https://discourse.cmake.org/u/hwhsu1231)
#### Post date: [April 19, 2024, 4:58pm UTC](https://discourse.cmake.org/t/suitable-versions-of-sphinx-for-building-different-versions-of-cmake-docs/7982/13 "2024-04-19T16:58:51Z")

</div>

Hello, CMake Team.

From the research of this [topic](https://discourse.cmake.org/t/failed-to-translate-the-content-of-parsed-literal-directive-with-hyperlinks-in-cmake-1-rst/10541), it appears that the [issue](https://github.com/sphinx-doc/sphinx/issues/12287) is actually a bug from Sphinx itself. Therefore, it can be resolved by fixing the issue in a new version of Sphinx. However, some old versions of CMake files can only be built using old versions of Sphinx, so they won’t be able to fix this issue. This is why I hope the CMake team will continue to maintain the Sphinx documentation system for older versions of CMake.

Additionally, I hope that the CMake project, like other projects using Sphinx, would prepare a `requirements.txt` file specifying the required Sphinx version and other dependencies. This way, users only need to run `pip install -r requirements.txt` before building the documentation, without worrying about which version of Sphinx to install. For instance, to build documentation for all versions of CMake, I had to prepare corresponding `requirements.txt` files in the project as shown below:

 ![Screenshot_20240420_003349](https://discourse.cmake.org/uploads/default/original/2X/2/27d6bcdfb1d600b841eb967c89b7fa2debd0a057.png)

If CMake project can prepare a `requirements.txt`, then this code can be removed. All I need to do is to find the `requirements.txt` and run `pip install -r` to install it.

---

_[View the full topic](https://discourse.cmake.org/t/suitable-versions-of-sphinx-for-building-different-versions-of-cmake-docs/7982)._
