Skip to content

Commit 49c0fc9

Browse files
committed
fix: Makefile ensure .venv exists for internal commands
1 parent 09335c9 commit 49c0fc9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ SPHINXBUILD = $(shell pwd)/.venv/bin/sphinx-build
1010
.venv: pyproject.toml uv.lock
1111
which uv >/dev/null || python3 -m pip install -U uv
1212
uv sync --extra dev
13+
touch -f .venv
1314

1415
init: .venv
1516
.PHONY: init
1617

1718

18-
tests: init
19+
tests: .venv
1920
$(BIN)/tox
2021
.PHONY: tests
2122

2223
# Alias for old-style invocation
2324
test: tests
2425
.PHONY: test
2526

26-
coverage:
27+
coverage: .venv
2728
$(BIN)/coverage run -m unittest discover -t . -s tests
2829
$(BIN)/coverage xml
2930
.PHONY: coverage
@@ -43,10 +44,10 @@ clean: clean-docs
4344
.PHONY: clean-python
4445

4546

46-
docs:
47+
docs: .venv
4748
cd docs; make html SPHINXBUILD=$(SPHINXBUILD); make man SPHINXBUILD=$(SPHINXBUILD); make doctest SPHINXBUILD=$(SPHINXBUILD)
4849

49-
lint:
50+
lint: .venv
5051
$(BIN)/ruff check hl7 tests
5152
CHECK_ONLY=true $(MAKE) format
5253
.PHONY: lint
@@ -55,7 +56,7 @@ CHECK_ONLY ?=
5556
ifdef CHECK_ONLY
5657
RUFF_FORMAT_ARGS=--check
5758
endif
58-
format:
59+
format: .venv
5960
$(BIN)/ruff format $(RUFF_FORMAT_ARGS) hl7 tests
6061

6162
.PHONY: format
@@ -66,6 +67,6 @@ upload:
6667
$(UV) publish
6768
.PHONY: upload
6869

69-
bump: init
70+
bump: .venv
7071
$(BIN)/cz bump
7172
.PHONY: bump

0 commit comments

Comments
 (0)