-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (35 loc) · 1.07 KB
/
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
52
53
.venv/venv.timestamp:
python3 -m venv .venv
.venv/bin/pip install wheel
touch $@
.venv/requirements.timestamp: .venv/venv.timestamp setup.py requirements.txt
.venv/bin/pip install --upgrade -r requirements.txt
touch $@
.PHONY: git-attributes
git-attributes:
git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`
.PHONY: lint
lint: .venv/requirements.timestamp
.venv/bin/flake8
.PHONY: test
test: .venv/requirements.timestamp
.venv/bin/py.test -vvv --cov --cov-config .coveragerc --cov-report=xml --cov-report=term tests
.PHONY: check
check: git-attributes lint test
.PHONY: clean
clean:
rm -rf .venv
rm -rf .pytest_cache
rm -rf build
rm -rf dist
rm -f .coverage
.PHONY: build
build: .venv/requirements.timestamp
.venv/bin/python setup.py clean sdist bdist_wheel
.PHONY: deploy
deploy: .venv/requirements.timestamp
# .venv/bin/twine upload -r testpypi dist/*
.venv/bin/python setup.py clean sdist bdist_wheel upload
.PHONY: doc
doc: .venv/requirements.timestamp
.venv/bin/sphinx-build -b html doc/source/ doc/build/html/