-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (37 loc) · 984 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
45
46
47
48
49
NAME := theprogram
DESTDIR ?= installdir
INSTALLDIR := $(DESTDIR)/$(NAME)
describe := $(shell git describe --dirty)
tarfile := $(NAME)-$(describe).tar.gz
all:
false
# python-coverage pulls in these other packages
# - libjs-jquery-hotkeys libjs-jquery-isonscreen libjs-jquery
# libjs-jquery-tablesorter
# however, it also wants jquery.debounce, which is not packaged.. (but not
# required for functionality...)
#
build-dep:
apt-get install python3
apt-get install python3-coverage
install:
mkdir -p $(INSTALLDIR)
cp -pr lib $(INSTALLDIR)/lib
install -p theprogram.py $(INSTALLDIR)
tar: $(tarfile)
$(tarfile):
$(MAKE) install
tar -v -c -z -C $(DESTDIR) -f $(tarfile) .
test:
./run_tests.py
cover:
./run_tests.py cover
# pylint is a little too opinionated to be used by default in the test target
lint:
pylint3 *.py lib/*
# an alternative to pylint is using flake8:
flake8:
flake8
clean:
rm -rf htmlcov .coverage
find . -name '*.pyc' -print0 |xargs -0 rm