Skip to content
main
Switch branches/tags
Code

This repository contains scripts for automatically building the Python documentation on docs.python.org.

How to test it?

The following command should build all maintained versions and translations in ./www, beware it can take a few hours:

python3 ./build_docs.py --quick --build-root ./build_root --www-root ./www --log-directory ./logs --group $(id -g) --skip-cache-invalidation

If you don't need to build all translations of all branches, add --language en --branch main.

Check current version

Install tools_requirements.txt then run python check_versions.py ../cpython/ (pointing to a real CPython clone) to see which version of Sphinx we're using where:

Docs build server is configured to use Sphinx 2.3.1

Sphinx configuration in various branches:

========  =============  =============  ==================  ====================  =============  ===============
branch    travis         azure          requirements.txt    conf.py               Makefile       Mac installer
========  =============  =============  ==================  ====================  =============  ===============
2.7       sphinx~=2.0.1  ø              ø                   needs_sphinx='1.2'
3.5       sphinx==1.8.2  ø              ø                   needs_sphinx='1.8'
3.6       sphinx==1.8.2  sphinx==1.8.2  ø                   needs_sphinx='1.2'    Sphinx==2.3.1
3.7       sphinx==1.8.2  sphinx==1.8.2  ø                   needs_sphinx="1.6.6"  Sphinx==2.3.1  Sphinx==2.3.1
3.8                      sphinx==1.8.2  sphinx==2.4.4       needs_sphinx='1.8'
3.9                      sphinx==2.2.0  sphinx==2.4.4       needs_sphinx='1.8'
3.10                                    sphinx==3.2.1       needs_sphinx='1.8'
main                                    sphinx==3.2.1       needs_sphinx='1.8'
========  =============  =============  ==================  ====================  =============  ===============

Sphinx build as seen on docs.python.org:

========  =====  =====  =====  =====  =====  =====  =====  =======  =======  =======
branch    en     es     fr     id     ja     ko     pl     pt-br    zh-cn    zh-tw
========  =====  =====  =====  =====  =====  =====  =====  =======  =======  =======
2.7       2.3.1  ø      2.3.1  2.3.1  2.3.1  2.3.1  ø      2.3.1    2.3.1    2.3.1
3.5       1.8.4  1.8.4  1.8.4  1.8.4  1.8.4  1.8.4  1.8.4  1.8.4    1.8.4    1.8.4
3.6       2.3.1  2.3.1  2.3.1  2.3.1  2.3.1  2.3.1  2.3.1  2.3.1    2.3.1    2.3.1
3.7       2.3.1  2.3.1  2.3.1  2.3.1  2.3.1  2.3.1  2.3.1  2.3.1    2.3.1    2.3.1
3.8       2.4.4  2.4.4  2.4.4  2.4.4  2.4.4  2.4.4  2.4.4  2.4.4    2.4.4    2.4.4
3.9       2.4.4  2.4.4  2.4.4  2.4.4  2.4.4  2.4.4  2.4.4  2.4.4    2.4.4    2.4.4
3.10      3.2.1  3.2.1  3.2.1  3.2.1  3.2.1  3.2.1  3.2.1  3.2.1    3.2.1    3.2.1
3.11      3.2.1  3.2.1  3.2.1  3.2.1  3.2.1  3.2.1  3.2.1  3.2.1    3.2.1    3.2.1
========  =====  =====  =====  =====  =====  =====  =====  =======  =======  =======

The github hook server

build_docs_server.py is a simple HTTP server handling Github Webhooks requests to build the doc when needed. It only needs push events.

Its logging can be configured by giving a yaml file path to the --logging-config argument.

By default the loglevel is DEBUG on stderr, the default config can be found in the code so one can bootstrap a different config from it.

About

scripts for building documentation on docs.python.org

Resources

Releases

No releases published

Packages

No packages published