From 13e3f0bab82367b3b3ff57d32d491b6627a5cdc5 Mon Sep 17 00:00:00 2001 From: Jelmer Draaijer Date: Sun, 6 Oct 2024 12:28:54 +0200 Subject: [PATCH] Activate virtualenv for making docs --- tests/test_bare.sh | 1 + tests/test_cookiecutter_generation.py | 2 +- {{cookiecutter.project_slug}}/docs/Makefile | 2 +- {{cookiecutter.project_slug}}/docs/make.bat | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_bare.sh b/tests/test_bare.sh index 374fcd9c..1039b1a8 100755 --- a/tests/test_bare.sh +++ b/tests/test_bare.sh @@ -33,5 +33,6 @@ then npm run build fi +. .venv/bin/activate # Generate the HTML for the documentation cd docs && make html diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 56008501..082c3cba 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -325,7 +325,7 @@ def test_gitlab_invokes_precommit_and_pytest(cookies, context, use_docker, expec @pytest.mark.parametrize( ["use_docker", "expected_test_script"], [ - ("n", "pytest"), + ("n", "uv run pytest"), ("y", "docker compose -f docker-compose.local.yml run django pytest"), ], ) diff --git a/{{cookiecutter.project_slug}}/docs/Makefile b/{{cookiecutter.project_slug}}/docs/Makefile index bd21c083..9e0e4d6c 100644 --- a/{{cookiecutter.project_slug}}/docs/Makefile +++ b/{{cookiecutter.project_slug}}/docs/Makefile @@ -4,7 +4,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= -SPHINXBUILD ?= uv run sphinx-build +SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = ./_build {%- if cookiecutter.use_docker == 'y' %} diff --git a/{{cookiecutter.project_slug}}/docs/make.bat b/{{cookiecutter.project_slug}}/docs/make.bat index 0fa28a86..fbf6eb45 100644 --- a/{{cookiecutter.project_slug}}/docs/make.bat +++ b/{{cookiecutter.project_slug}}/docs/make.bat @@ -6,7 +6,7 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=uv run sphinx-build -c . + set SPHINXBUILD=sphinx-build -c . ) set SOURCEDIR=_source set BUILDDIR=_build