-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
47 lines (39 loc) · 1.36 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
.PHONY: help init clean test test-all coverage lint release
help:
@echo "Using make is entirely optional; these are simply shortcuts"
@echo "See README.rst for normal usage."
@echo ""
@echo "init - create virtual environment"
@echo "clean - remove all build and test artifacts"
@echo "test - run all tests using current python environment"
@echo "test-all - run all tests in all supported python environments"
@echo "coverage - check code coverage while running all tests using current python environment"
@echo "lint - check code style"
@echo "release - NOT NORMALLY USED; See README.rst for release process"
init:
[ -d venv ] || python -m venv venv
./venv/bin/pip install -U setuptools pip wheel
./venv/bin/pip install --editable .
@echo `./venv/bin/python --version` virtual environment installed. Activate it using '`. ./venv/bin/activate`'
clean:
rm -fr build/ dist/ .eggs/ .tox/ .coverage
find . -name '*.pyc' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
test:
pip install --editable .
pip install -r requirements-test.txt
python -m tests
test-all:
pip install --upgrade tox
tox
coverage:
pip install --upgrade coverage
coverage run setup.py test
coverage report --show-missing
lint:
pip install -r requirements-lint.txt
flake8 --verbose
release: clean
pip install -r requirements-release.txt
python -m build
twine upload dist/*