PEP 545 by JulienPalard · Pull Request #11 · python/docsbuild-scripts (original) (raw)

This implements https://www.python.org/dev/peps/pep-0545/, building all known translations by default (only french for the moment, japanese may arrive soon.

This implements no crosslink between versions (no language switcher in the graphical interface) allowing to test for a period of time before going really public about it.

I tested it with:

$ mkdir /tmp/build_root  /tmp/www_root /tmp/log_root
$ git clone https://github.com/python/cpython.git --branch 3.6 --depth 1 /tmp/build_root/python36
$ git clone https://github.com/python/cpython.git --branch 2.7 --depth 1 /tmp/build_root/python27
$ git clone https://github.com/python/cpython.git --branch 3.5 --depth 1 /tmp/build_root/python35
$ git clone https://github.com/python/cpython.git --branch master --depth 1 /tmp/build_root/python37
$ python3 -m venv /tmp/build_root/environment/
$ . /tmp/build_root/environment/bin/activate
$ python3 -m pip install -r requirements.txt
$ python3 ./build_docs.py --git --build-root /tmp/build_root/ --www-root /tmp/www_root/ --log-directory /tmp/log_root/ --skip-cache-invalidation --group $(id -gn)

And it went well, properly skipping untranslated versions, building a correct hierarchy in www_root. It'll probably miss some work before implementing cross-linking like setting symlinks like /3/, and /dev/, which are currently done manually if I'm right, that I should implement in salt or in this script in a near future.