generated from Kronopt/PythonProjectTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
67 lines (53 loc) · 1.97 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
.PHONY: help install-dependencies install-dependencies-dev test lint coverage docs-test build build-test release clean-coverage clean-build clean-pyc clean
help:
@echo ""
@echo "install-dependencies installs dependencies"
@echo "install-dependencies-dev installs dev dependencies"
@echo ""
@echo "test runs tests"
@echo "lint runs linter"
@echo "coverage runs coverage test"
@echo "docs-test tests docs for build errors and serves them locally"
@echo ""
@echo "build builds python package (sdist)"
@echo "build-test tests build for errors and uploads to test.pypi.org"
@echo "release builds and uploads python package to pypi.org"
@echo ""
@echo "clean-coverage removes coverage files"
@echo "clean-build removes packaging artifacts"
@echo "clean-pyc removes python file artifacts"
@echo "clean runs all cleaning functions"
@echo ""
install-dependencies:
python -m pip install -r requirements.txt
install-dependencies-dev:
python -m pip install -r requirements-dev.txt
test:
nose2 -s ./tests -t .
lint:
python -m pylint xkcd_wrapper setup.py
python -m black --check .
coverage:
python -m coverage run --source xkcd_wrapper -m nose2 -s ./tests -t .
python -m coverage report -m
docs-test:
mkdocs serve -s -f .mkdocs.yml
build: clean-pyc clean-build
python setup.py sdist bdist_wheel
build-test:
twine check dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
release: build
twine upload dist/*
clean-coverage:
python -m coverage erase
clean-build:
rm -rf build/
rm -rf dist/
rm -rf xkcd_wrapper.egg-info/
clean-pyc:
rm -rf xkcd_wrapper/__pycache__ tests/__pycache__
rm -f xkcd_wrapper/*.pyc tests/*.pyc
rm -f xkcd_wrapper/*.pyo tests/*.pyo
rm -f xkcd_wrapper/*~ tests/*~
clean: clean-coverage clean-build clean-pyc