-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (44 loc) · 911 Bytes
/
Makefile
File metadata and controls
57 lines (44 loc) · 911 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
SOURCES=*.py expression/*.py tests/*.py
COVERAGE=coverage
TEST=-m unittest discover -s tests -p '*.py'
.PHONY: all
all: release
.PHONY: release
release: ruff coverage clean tag build push upload
.PHONY: setup
setup:
pip install setuptools wheel
.PHONY: get_version
get_version:
$(eval VERSION=v$(shell python setup.py --version))
python setup.py --version
.PHONY: pylint
pylint:
pylint $(SOURCES)
.PHONY: ruff
ruff:
ruff check $(SOURCES)
.PHONY: tag
tag: get_version
git tag $(VERSION)
.PHONY: build
build:
python setup.py sdist
python setup.py bdist_wheel --universal
.PHONY: push
push: get_version
git push origin $(VERSION)
.PHONY: upload
upload:
twine upload dist/*
.PHONY: test
test:
python $(TEST)
.PHONY: coverage
coverage:
$(COVERAGE) run $(TEST)
$(COVERAGE) report -m
$(COVERAGE) xml -i -o coverage.xml
.PHONY: clean
clean:
rm -rf build/ dist/ expression.egg-info .coverage