-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (51 loc) · 1.21 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.PHONY: clean-pyc clean-build test
all: clean sdist wheel
clean: clean-build clean-pyc
clean-build:
$(info # Removing build artefacts)
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
rm -fr .mypy_cache/
clean-pyc:
$(info # Removing pycies artefacts)
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
isort:
$(info # Sorting imports)
sh -c "isort --skip-glob=.tox --recursive . "
lint:
flake8 --exclude=.tox
dev: dev-requirements.txt
$(info # Removing pycies artefacts)
pip install -r dev-requirements.txt
sdist: clean
$(info # Build the sdist)
python setup.py sdist
ls -l dist
wheel: clean
$(info # Build the wheel)
python setup.py bdist_wheel
ls -l dist
pep8:
autopep8 -aa --in-place --recursive --max-line-length=130 ./src
test:
$(info # Testing with tox)
tox
flake8 ./src/
coverage:
$(info # Test coverage)
coverage run --source=./src/ -m py.test tests/ -v --tb=native
coverage report
coverage-html: coverage
coverage html
patch:
bumpversion patch
git-clean:
git clean -f -d
release: clean
python setup.py bdist_wheel
twine upload ./dist/* --verbose
rst: README.md
pandoc --from=gfm --to=rst --output=README.rst README.md