Skip to content

Commit 22affa4

Browse files
remove redundant commands from Makefile (csernazs#170)
* remove redundant commands from Makefile * make target dependent on poetry.lock and pyproject.toml
1 parent aa7f175 commit 22affa4

1 file changed

Lines changed: 9 additions & 14 deletions

File tree

Makefile

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
1-
21
export POETRY_VIRTUALENVS_IN_PROJECT=true
32
EXTRAS ?= develop
43
SPHINXOPTS ?= -n
54

6-
.venv/.st-venv-completed:
5+
# do poetry install only in case if poetry.lock or pyproject.toml where updated and
6+
# we require a rebuilt.
7+
.venv/.st-venv-completed: poetry.lock pyproject.toml
78
poetry install --verbose --with $(EXTRAS)
89
touch .venv/.st-venv-completed
910

10-
.PHONY: venv
11-
venv: .venv/.st-venv-completed
1211

1312
.PHONY: dev
14-
dev: venv
13+
dev: .venv/.st-venv-completed
1514

1615
.PHONY: precommit
17-
precommit: venv
16+
precommit: dev
1817
poetry run pre-commit run -a
1918

2019
.PHONY: mypy
21-
mypy: venv
20+
mypy: dev
2221
.venv/bin/mypy
2322

24-
.PHONY: autoformat
25-
autoformat: dev
26-
.venv/bin/autopep8 --in-place --recursive pytest_httpserver tests
27-
2823
.PHONY: mrproper
2924
mrproper: clean
3025
rm -rf dist
@@ -34,7 +29,7 @@ clean: cov-clean doc-clean
3429
rm -rf .venv *.egg-info build .eggs __pycache__ */__pycache__ .tox
3530

3631
.PHONY: test
37-
test: venv
32+
test: dev
3833
.venv/bin/pytest tests -s -vv --release
3934
.venv/bin/pytest tests -s -vv --ssl
4035

@@ -53,15 +48,15 @@ cov-clean:
5348
rm -rf htmlcov coverage.xml .coverage
5449

5550
.PHONY: doc
56-
doc: .venv
51+
doc: dev
5752
.venv/bin/sphinx-build -M html doc doc/_build $(SPHINXOPTS) $(O)
5853

5954
.PHONY: doc-clean
6055
doc-clean:
6156
rm -rf doc/_build
6257

6358
.PHONY: changes
64-
changes: venv
59+
changes: dev
6560
.venv/bin/reno report --output CHANGES.rst --no-show-source
6661
poetry run pre-commit run --files CHANGES.rst || true
6762
poetry run pre-commit run --files CHANGES.rst

0 commit comments

Comments
 (0)