Skip to content

Commit 644c58c

Browse files
authored
Use uv in make docs to be aligned with RTD builds (teemtee#4639)
When building docs for RTD, Github action uses `uv` and its lockfile. Current `make docs` relies on `hatch`, and ends up with different Python environment, which hits errors we don't observe in Github. Let's use the same tooling for both so we can test things. Pull Request Checklist * [x] implement the feature
1 parent 474293c commit 644c58c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/doc-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
if: ${{ matrix.builder == 'linkcheck' }}
5252

5353
- name: Run sphinx builder ${{ matrix.sphinx_builder || matrix.builder }}
54-
run: sphinx-build -b ${{ matrix.sphinx_builder || matrix.builder }} ${{ matrix.args }} docs/ docs/_build
54+
run: sphinx-build -E -b ${{ matrix.sphinx_builder || matrix.builder }} ${{ matrix.args }} docs/ docs/_build
5555

5656
# TODO: enable all checks
5757
# https://github.com/sphinx-contrib/sphinx-lint/issues/74

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ requre: ## Regenerate test data for integration tests
4444
## Documentation
4545
##
4646
docs: clean ## Build documentation
47-
hatch run docs:html
47+
uv sync --frozen --extra docs
48+
uv run sphinx-build -E -b html docs docs/_build
4849

4950
man: ## Build man page
5051
hatch run docs:man
@@ -66,7 +67,7 @@ srpm: tarball ver2spec ## Build SRPM
6667
rpmbuild --define '_topdir $(TMP)' -bs packaging/rpm/tmt.spec
6768

6869
_deps: # Minimal dependencies (common for 'deps' and 'develop' targets)
69-
sudo dnf install -y hatch python3-devel python3-hatch-vcs rpm-build clang beakerlib
70+
sudo dnf install -y hatch uv python3-devel python3-hatch-vcs rpm-build clang beakerlib
7071

7172
build-deps: _deps tarball ver2spec ## Install build dependencies
7273
rpmbuild --define '_topdir $(TMP)' -br packaging/rpm/tmt.spec || sudo dnf builddep -y $(TMP)/SRPMS/tmt-*buildreqs.nosrc.rpm

0 commit comments

Comments
 (0)