| 1 |
.PHONY: clean-pyc clean-build docs |
| 2 |
|
| 3 |
help: |
| 4 |
@echo "clean-build - remove build artifacts" |
| 5 |
@echo "clean-pyc - remove Python file artifacts" |
| 6 |
@echo "lint - check style with flake8" |
| 7 |
@echo "test - run mt940_tests quickly with the default Python" |
| 8 |
@echo "testall - run mt940_tests on every Python version with tox" |
| 9 |
@echo "coverage - check code coverage quickly with the default Python" |
| 10 |
@echo "docs - generate Sphinx HTML documentation, including API docs" |
| 11 |
@echo "release - package and upload a release" |
| 12 |
@echo "sdist - package" |
| 13 |
|
| 14 |
clean: clean-build clean-pyc |
| 15 |
|
| 16 |
clean-build: |
| 17 |
rm -fr build/ |
| 18 |
rm -fr dist/ |
| 19 |
rm -fr *.egg-info |
| 20 |
|
| 21 |
clean-pyc: |
| 22 |
find . -name '*.pyc' -exec rm -f {} + |
| 23 |
find . -name '*.pyo' -exec rm -f {} + |
| 24 |
find . -name '*~' -exec rm -f {} + |
| 25 |
|
| 26 |
lint: |
| 27 |
flake8 mt940 mt940_tests |
| 28 |
|
| 29 |
test: |
| 30 |
py.test |
| 31 |
|
| 32 |
test-all: |
| 33 |
tox |
| 34 |
|
| 35 |
coverage: |
| 36 |
coverage run --source mt940 setup.py test |
| 37 |
coverage report -m |
| 38 |
coverage html |
| 39 |
open htmlcov/index.html |
| 40 |
|
| 41 |
docs: |
| 42 |
rm -f docs/mt940.rst |
| 43 |
rm -f docs/modules.rst |
| 44 |
sphinx-apidoc -o docs/ mt940 |
| 45 |
$(MAKE) -C docs clean |
| 46 |
$(MAKE) -C docs html |
| 47 |
open docs/_build/html/index.html |
| 48 |
|
| 49 |
release: clean |
| 50 |
python setup.py register || true |
| 51 |
python setup.py sdist upload build_sphinx upload_sphinx |
| 52 |
|
| 53 |
sdist: clean |
| 54 |
python setup.py sdist |
| 55 |
ls -l dist |