Skip to content

Commit

Permalink
Fix broken docs environment in tox.ini (#2720)
Browse files Browse the repository at this point in the history
* Lock libsass version

Our requirements files already lock libsass to 0.15.1, but since the
pyproject.toml file doesn't, it leads to problems when building e.g. tox
environments on some Linux distros (particularly, on NixOS, it ends up
download a Python egg with a binary that declares dynamic dependencies
incompatible with NixOS)

* Make tox docs env more like the default testenv

Various strange problems (that differ between developers) kept cropping
up when trying to build the docs environment using the "old" method with
pip-tools.

This resets the doc environment to look more like we now handle the
default testenv in tox.ini, and should therefore also fix the doc builds.

Authored by: Morten Brekkevold <[email protected]>
  • Loading branch information
lunkwill42 authored Nov 8, 2023
1 parent b7625d7 commit 2936956
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0", "wheel", "setuptools_scm[toml]>=6.2", "libsass"]
requires = ["setuptools>=61.0", "wheel", "setuptools_scm[toml]>=6.2", "libsass==0.15.1"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@ commands =

[testenv:docs]
description = Just build the Sphinx documentation
deps = pip-tools
deps =
-r doc/requirements.txt

usedevelop = true
setenv =
PYTHONPATH = {toxinidir}/python:{toxinidir}/tests
DJANGO_SETTINGS_MODULE = nav.django.settings
LC_ALL=C.UTF-8
LANG=C.UTF-8
VIRTUALENV_PIP=23.1.0
allowlist_externals = sh
commands_pre =
pip-compile --resolver=backtracking --output-file {envdir}/requirements.txt doc/requirements.txt
pip-sync {envdir}/requirements.txt
commands =
sphinx-build doc/ doc/_build/
sh -c "cd doc; python -c 'import conf; print(conf.version)' > {toxinidir}/reports/doc_version"
Expand Down

0 comments on commit 2936956

Please sign in to comment.