-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
51 lines (39 loc) · 811 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
51
COVERAGE=coverage
TEST=-m unittest discover -s tests -p '*.py'
.PHONY: all
all: release
.PHONY: release
release: pylint test 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 *.py expression/*.py tests/*.py
.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
.PHONY: clean
clean:
rm -rf build/ dist/ expression.egg-info .coverage