-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
50 lines (36 loc) · 879 Bytes
/
Makefile
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
42
43
44
45
46
47
48
49
50
HERE = $(shell pwd)
BIN = $(HERE)/bin
PYTHON = $(BIN)/python
INSTALL = $(BIN)/pip install --no-deps
BUILD_DIRS = bin build include lib lib64 man share
VIRTUALENV = virtualenv
.PHONY: all test build clean docs ruff release pyright lint
all: build
$(PYTHON):
$(VIRTUALENV) $(VTENV_OPTS) .
build: $(PYTHON)
$(PYTHON) setup.py develop
$(BIN)/pip install tox
clean:
rm -rf $(BUILD_DIRS)
test: build
$(BIN)/tox
docs: build
$(BIN)/tox -e docs
$(BIN)/ruff:
$(BIN)/pip install ruff
ruff: $(BIN)/ruff
$(BIN)/ruff check setup.py molotov/
$(BIN)/ruff format setup.py molotov/*.py
$(BIN)/twine: $(PYTHON)
$(BIN)/pip install twine
$(BIN)/pip install wheel
release: $(BIN)/twine
rm -rf dist/
$(BIN)/python setup.py sdist bdist_wheel
$(BIN)/twine upload dist/*
$(BIN)/pyright: $(PYTHON)
$(BIN)/pip install pyright
pyright: $(BIN)/pyright
lint: ruff
$(BIN)/pyright