forked from wavexx/acpilight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
107 lines (85 loc) · 2.18 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
MAIN_PACKAGE := acpilight
.PHONY: all
all: build
.PHONY: init
init:
@pip install -r requirements.txt
.PHONY: install
install:
@./setup.py install --optimize=1 --record=install.log
.PHONY: build
build:
@./setup.py build
.PHONY: check
check:
@echo "────────────────── flake8 ──────────────────"
@flake8 --show-source --statistics $(MAIN_PACKAGE)
@echo "────────────────────────────────────────────"
@echo
@echo
@echo "────────────────── pylint ──────────────────"
@pylint $(MAIN_PACKAGE)
@echo "────────────────────────────────────────────"
.PHONY: release
release: clean
@./setup.py sdist upload
@./setup.py bdist_wheel upload
.PHONY: dist
dist: clean
@./setup.py sdist
@./setup.py bdist_wheel
.PHONY: docs
docs:
@sphinx-apidoc -o docs/ $(MAIN_PACKAGE)
@$(MAKE) -C docs clean
@$(MAKE) -C docs html
.PHONY: test
test:
@./setup.py test
.PHONY: test-all
test-all:
@tox
.PHONY: tox
tox: test-all
.PHONY: coverage
coverage:
@coverage run --source $(MAIN_PACKAGE) -m py.test
@coverage report
@coverage html
.PHONY: clean
clean: clean-bytecode clean-coverage clean-eggs \
clean-dist clean-build clean-tox clean-cache \
clean-dev clean-install
.PHONY: clean-install
clean-install:
@rm -f install.log
.PHONY: clean-bytecode
clean-bytecode:
@find . -name '*.pyc' -type f -delete
@find . -name '*.pyo' -type f -delete
@find . -name '*~' -type f -delete
@find . -name '__pycache__' -type d -exec rm -fr {} +
.PHONY: clean-coverage
clean-coverage:
@rm -rf htmlcov
@rm -f .coverage
.PHONY: clean-eggs
clean-eggs:
@rm -rf .eggs
@rm -rf *.egg-info
.PHONY: clean-dist
clean-dist:
@rm -rf dist
.PHONY: clean-build
clean-build:
@rm -rf build
.PHONY: clean-tox
clean-tox:
@rm -rf .tox
.PHONY: clean-cache
clean-cache:
@rm -rf .cache
.PHONY: clean-dev
clean-dev:
@find . -name '.mypy_cache' -type d -exec rm -fr {} +
@find . -name '.ropeproject' -type d -exec rm -fr {} +