updates makefile

This commit is contained in:
Michael Beck 2025-04-01 19:30:06 +02:00
parent f6a9122537
commit f3ae6cadbb

View File

@ -1,3 +1,8 @@
.PHONY: all clean venv run format format-check lint mypy test dist reformat dev
PYTHON := venv/bin/python
PIP := venv/bin/pip
all: run all: run
clean: clean:
@ -5,27 +10,32 @@ clean:
venv: venv:
python3 -m venv venv && \ python3 -m venv venv && \
venv/bin/pip install --upgrade pip setuptools && \ $(PIP) install --upgrade pip setuptools && \
venv/bin/pip install --editable ".[dev]" $(PIP) install --editable ".[dev]"
run: venv run: venv
venv/bin/flask --app scipaperloader --debug run venv/bin/flask --app scipaperloader --debug run
format: venv format:
rm -rf venv venv/bin/black .
venv/bin/black . && venv/bin/isort . venv/bin/isort .
format-check: venv format-check:
venv/bin/black --check . && venv/bin/isort --check . venv/bin/black --check .
venv/bin/isort --check .
lint: venv reformat: format lint
lint:
venv/bin/flake8 . venv/bin/flake8 .
mypy: venv mypy:
venv/bin/mypy venv/bin/mypy scipaperloader
test: venv test:
venv/bin/pytest venv/bin/pytest
dist: venv format-check lint mypy test dist: format-check lint mypy test
venv/bin/pip wheel --wheel-dir dist --no-deps . $(PIP) wheel --wheel-dir dist --no-deps .
dev: clean venv