-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
executable file
·51 lines (38 loc) · 1.39 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
OK_COLOR=\033[32;01m
NO_COLOR=\033[0m
all: test
export PYTHONPATH:=${PWD}
version=`python -c 'import paco; print(paco.__version__)'`
filename=paco-`python -c 'import paco; print(paco.__version__)'`.tar.gz
apidocs:
@sphinx-apidoc -f --follow-links -H "API documentation" -o docs/source paco
htmldocs:
@rm -rf docs/_build
$(MAKE) -C docs html
lint:
@echo "$(OK_COLOR)==> Linting code...$(NO_COLOR)"
@flake8 --exclude examples .
test: clean lint
@echo "$(OK_COLOR)==> Runnings tests...$(NO_COLOR)"
@py.test -s -v --capture=sys --cov paco --cov-report term-missing
coverage:
@coverage run --source paco -m py.test
@coverage report
bump:
@bumpversion --commit --tag --current-version $(version) patch paco/__init__.py --allow-dirty
bump-minor:
@bumpversion --commit --tag --current-version $(version) minor paco/__init__.py --allow-dirty
push-tag:
@echo "$(OK_COLOR)==> Pushing tag to remote...$(NO_COLOR)"
@git push origin "v$(version)"
clean:
@echo "$(OK_COLOR)==> Cleaning up files that are already in .gitignore...$(NO_COLOR)"
@for pattern in `cat .gitignore`; do find . -name "$$pattern" -delete; done
release: clean bump push-tag publish
@echo "$(OK_COLOR)==> Done! $(NO_COLOR)"
publish:
@echo "$(OK_COLOR)==> Releasing package ...$(NO_COLOR)"
@python setup.py register
@python setup.py sdist upload
@python setup.py bdist_wheel --universal upload
@rm -fr build dist .egg paco.egg-info