From b4720615e1055f05b50fe45c1ca256a27f39315b Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Wed, 8 Nov 2023 12:30:05 +0100 Subject: [PATCH 1/2] 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) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b53ed5ebe9..c9d481806b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] From 2954636cec6df8e3bad6b2becbb03af9bdb182e6 Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Wed, 8 Nov 2023 12:32:24 +0100 Subject: [PATCH 2/2] 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. --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index d8594d1512..c189504894 100644 --- a/tox.ini +++ b/tox.ini @@ -113,7 +113,10 @@ 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 @@ -121,9 +124,6 @@ setenv = 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"