-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
76 lines (57 loc) · 1.44 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
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PART=patch
PROJECT_NAME=cpk
TEST=*
all:
new-dist:
$(MAKE) clean bump-upload
bump-upload:
$(MAKE) test bump upload
bump:
bumpversion ${PART}
upload:
git push --tags
git push
$(MAKE) clean
$(MAKE) build
twine upload dist/*
build:
python3 setup.py sdist
install:
python3 setup.py install --record files.txt
clean:
rm -rf dist/ build/ ${PROJECT_NAME}.egg-info/ MANIFEST
uninstall:
xargs rm -rf < files.txt
format:
yapf -r -i -p -vv ${ROOT_DIR}
build-image-ubuntu-jammy:
$(MAKE) -f ${ROOT_DIR}/images/ubuntu/jammy/Makefile build
new-dist-image-ubuntu-jammy:
$(MAKE) -f ${ROOT_DIR}/images/ubuntu/jammy/Makefile build
test:
$(MAKE) test-unit
$(MAKE) test-distribution
test-unit:
@echo "Running unit tests:"; echo ""
@PYTHONPATH="${ROOT_DIR}/include/:$${PYTHONPATH}" \
python3 \
-m unittest discover \
--verbose \
-s "${ROOT_DIR}/tests/unit" \
-p "test_*.py" \
-k "${TEST}"
test-internal:
@echo "Running internal units tests:"; echo ""
@PYTHONPATH="${ROOT_DIR}/include/:$${PYTHONPATH}" \
python3 \
-m unittest discover \
--verbose \
-s "${ROOT_DIR}/tests/unit" \
-p "test_internal_*.py"
test-build:
$(MAKE) -f ${ROOT_DIR}/tests/build/Makefile test
test-distribution:
$(MAKE) -f ${ROOT_DIR}/tests/distribution/Makefile test-all
test-distribution-3.6:
$(MAKE) -f ${ROOT_DIR}/tests/distribution/Makefile test-no-clean PYTHON_VERSION=3.6;