-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
85 lines (60 loc) · 1.42 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
PYTHON_FILES = mopidy_pummeluff
STATIC_FILES = mopidy_pummeluff/webui
BUILD_DIR = build
LINTER_CONFIGS = https://git.confirm.ch/confirm/development-guidelines/raw/master/configs
.PHONY: build
#
# Cleanup
#
clean: clean-test clean-build clean-node clean-venv
clean-test:
rm -vrf .isort.cfg .pylintrc tox.ini .eslintrc.yml .stylelintrc.yml
clean-build:
rm -vrf $(BUILD_DIR)
clean-node:
rm -vrf node_modules package-lock.json
clean-venv:
rm -vrf .venv
#
# Install
#
venv:
python3 -m venv .venv
develop-python:
pip3 install -r requirements.txt -r requirements-dev.txt
develop-node:
npm install
develop: develop-python develop-node
#
# Development
#
isort:
curl -sSfo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
isort $(PYTHON_FILES)
#
# Test
#
test-isort:
curl -sSfo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
isort -c --diff $(PYTHON_FILES)
test-pycodestyle:
curl -sSfo tox.ini $(LINTER_CONFIGS)/tox.ini
pycodestyle $(PYTHON_FILES)
test-pylint:
curl -sSfo .pylintrc $(LINTER_CONFIGS)/pylintrc
pylint $(PYTHON_FILES)
test-eslint:
curl -sSfo .eslintrc.yml $(LINTER_CONFIGS)/eslintrc.yml
npx eslint $(STATIC_FILES)/*.js
test-stylelint:
curl -sSfo .stylelintrc.yml $(LINTER_CONFIGS)/stylelintrc.yml
npx stylelint $(STATIC_FILES)/*.css
test: test-isort test-pycodestyle test-pylint test-eslint test-stylelint
#
# Build
#
sdist:
./setup.py sdist -d $(BUILD_DIR)
wheel:
./setup.py bdist_wheel -d $(BUILD_DIR)
build: sdist wheel