Skip to content

Commit

Permalink
Fix problems building docs during testing
Browse files Browse the repository at this point in the history
* Build docs using python3
* Work around a bug involving pip and setuptools:
  pypa/pip#2751
  • Loading branch information
hmpf committed Jan 27, 2020
1 parent c5bc568 commit e003220
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,21 @@ commands =
{toxinidir}/tests/docker/scripts/pylint.sh python/nav --jobs=4 --rcfile=python/pylint.rc --disable=I,similarities --load-plugins pylint_django --output-format=parseable

[testenv:docs]
basepython = python3.5
description = Just build the Sphinx documentation
deps = pip-tools
setenv =
PYTHONPATH = {toxinidir}/python:{toxinidir}/tests
DJANGO_SETTINGS_MODULE = nav.django.settings
LC_ALL=C.UTF-8
LANG=C.UTF-8
whitelist_externals = /bin/sh
whitelist_externals =
/bin/sh
touch
# The `touch` work arounds a bug pip sometimes has with setuptools. Symptom:
# UninstallationError: Cannot remove entries from nonexistent file <path>/easy-install.pth
commands =
touch {envdir}/lib/python3.5/site-packages/easy-install.pth
pip-compile --output-file {envdir}/requirements.txt tests/requirements.txt requirements/base.txt requirements/django111.txt
pip-sync {envdir}/requirements.txt

Expand Down

0 comments on commit e003220

Please sign in to comment.