7225d59f2a
During the doc migration spec, the location of published document is changed to /<project>/latest. The i18n guide is now published in their own way, so we need to switch the new location manually. Change-Id: I2d4c885810a60db19af6fdf93d1ee8d7a8f81142
43 lines
1.2 KiB
INI
43 lines
1.2 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = docs,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
passenv =
|
|
# Required by add-marker.sh
|
|
ZUUL*
|
|
# Pass NO_LANG_BUILD=1 if you would like to build English version only
|
|
NO_LANG_BUILD
|
|
commands =
|
|
# Build translated guides
|
|
{toxinidir}/tools/build-docs.sh
|
|
# Publish
|
|
mkdir -p publish-docs/i18n/latest
|
|
rsync -av --delete doc/build/html/ publish-docs/i18n/latest/
|
|
{toxinidir}/tools/add-marker.sh publish-docs/i18n/latest/
|
|
whitelist_externals =
|
|
mkdir
|
|
rsync
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
bash -c "find {toxinidir} -type f \( -name '*.po' -o -name '*.pot' \) -print0 | xargs -0 -n1 --no-run-if-empty msgfmt --check-format -o /dev/null"
|
|
python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml
|
|
whitelist_externals = bash
|
|
|
|
[testenv:generatepot]
|
|
# Generate POT files for translation
|
|
commands = {toxinidir}/tools/generatepot.sh
|