-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (45 loc) · 1.58 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
NAME=strings
SOURCES=src/${NAME}/__init__.py src/${NAME}/main.py
# Default action is to show this help message:
.help:
@echo "Possible targets:"
@echo " check-code Verify PEP 8 compliance (lint)"
@echo " check-security Verify security issues (audit)"
@echo " check-unused Find unused code"
@echo " check-version Find required Python version"
@echo " check-sloc Count Single Lines of Code"
@echo " checks Make all the previous tests"
@echo " format Format code"
@echo " package Build package"
@echo " upload-test Upload the package to TestPyPi"
@echo " upload Upload the package to PyPi"
@echo " distclean Remove all generated files"
check-code: /usr/local/bin/pylint
-pylint ${SOURCES}
lint: check-code
check-security: /usr/local/bin/bandit
-bandit -r ${SOURCES}
audit: check-security
check-unused: /usr/local/bin/vulture
-vulture --sort-by-size ${SOURCES}
check-version: /usr/local/bin/vermin
-vermin ${SOURCES}
check-sloc: /usr/local/bin/pygount
-pygount --format=summary .
checks: check-code check-security check-unused check-version check-sloc
format: /usr/local/bin/black
black ${SOURCES}
love:
@echo "Not war!"
man/${NAME}.1.gz: man/${NAME}.1
@gzip -k9c man/${NAME}.1 > man/${NAME}.1.gz
man/${NAME}.3.gz: man/${NAME}.3
@gzip -k9c man/${NAME}.3 > man/${NAME}.3.gz
package: man/${NAME}.1.gz man/${NAME}.3.gz
python -m build
upload-test:
python -m twine upload --repository testpypi dist/*
upload:
python -m twine upload dist/*
distclean:
rm -rf build dist man/${NAME}.1.gz man/${NAME}.3.gz src/*.egg-info