forked from stigok/sd-notify
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (32 loc) · 968 Bytes
/
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
.PHONY: build clean help install pypi-deploy test uninstall wheel_check
.SILENT: help install pypi-deploy test uninstall wheel_check
define HELP
Targets:
- build - builds the 'wheel' distribution file (calls clean)
- clean - cleans temporary files
- install - builds and locally installs to your interpreter (calls uninstall and build)
- uninstall - removes locally installed copy
- test - runs unit tests
endef
export HELP
help:
echo "$${HELP}"
false
build: wheel_check clean
python3 setup.py sdist bdist_wheel
clean:
rm -rf build dist *.egg-info __pycache__
install: build uninstall
pip3 install --user ./dist/*.whl
uninstall:
-pip3 uninstall -y systemd_watchdog
test:
./test_systemd_watchdog.py
pypi-deploy: build test ~/.pypirc
twine upload --repository pypi dist/*
WHEEL_INSTALLED = $(shell pip3 list | egrep '^wheel\s')
wheel_check:
ifeq ($(WHEEL_INSTALLED),)
$(error Need to 'pip3 install wheel')
endif
true