-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (28 loc) · 824 Bytes
/
Makefile
File metadata and controls
41 lines (28 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
VENV_BIN = python3 -m venv
VENV_DIR ?= .venv
VENV_ACTIVATE = . $(VENV_DIR)/bin/activate
venv: $(VENV_DIR)/bin/activate
$(VENV_DIR)/bin/activate: pyproject.toml
test -d $(VENV_DIR) || $(VENV_BIN) $(VENV_DIR)
$(VENV_ACTIVATE); pip install -e ".[dev]"
touch $(VENV_DIR)/bin/activate
clean:
rm -rf build/
rm -rf .eggs/
rm -rf *.egg-info/
rm -rf .venv
clean-dist: clean
rm -rf dist/
lint: venv
$(VENV_ACTIVATE); python -m ruff check . && python -m mypy
format: venv
$(VENV_ACTIVATE); python -m ruff format . && python -m ruff check . --fix
test: venv
$(VENV_ACTIVATE); python -m pytest
dist: venv
$(VENV_ACTIVATE); python -m build
install: venv
$(VENV_ACTIVATE); pip install -e .
upload: venv test dist
$(VENV_ACTIVATE); pip install --upgrade twine; twine upload dist/*
.PHONY: clean clean-dist format