-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (56 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
79 lines (56 loc) · 1.13 KB
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
#
# Settings
#
SOURCE_DIRS = podload
BUILD_DIR = build
LINTER_CONFIGS = https://gitlab.confirm.ch/confirm/dev-configs/-/raw/main/linter
PYPI_INDEX = https://pypi.confirm.ch/
.PHONY: build
#
# Cleanup
#
clean: clean-cache clean-test clean-build clean-venv
clean-cache:
find . -name '__pycache__' -delete
clean-test:
rm -vf .coverage coveragerc .isort.cfg .pylintrc tox.ini
clean-build:
rm -vrf $(BUILD_DIR) .eggs *.egg-info
clean-venv:
rm -vrf .venv
#
# Install
#
venv:
python3 -m venv .venv
develop:
pip3 install -i $(PYPI_INDEX) -e .[develop]
install:
pip3 install -i $(PYPI_INDEX) .
#
# Development
#
isort:
curl -sSfLo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
isort $(SOURCE_DIRS)
#
# Test
#
test-commits:
git tools validate
test-isort:
curl -sSfLo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
isort -c --diff $(SOURCE_DIRS)
test-pycodestyle:
curl -sSfLo tox.ini $(LINTER_CONFIGS)/tox.ini
pycodestyle $(SOURCE_DIRS)
test-pylint:
curl -sSfLo .pylintrc $(LINTER_CONFIGS)/pylintrc
pylint $(SOURCE_DIRS)
test: test-commits test-isort test-pycodestyle test-pylint
#
# Build
#
package:
python3 -mbuild -o $(BUILD_DIR)
build: package