-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
30 lines (25 loc) · 972 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
all: unittest check_convention
clean:
rm -fr build dist logbeam.egg-info
UNITTESTS=$(shell find tests -name 'test*.py' | sed 's@/@.@g' | sed 's/\(.*\)\.py/\1/' | sort)
COVERED_FILES=$(shell find logbeam -name '*.py' -printf '%p,')
unittest:
rm -f .coverage*
PYTHONPATH=`pwd` COVERAGE_FILE=`pwd`/.coverage python -m coverage run --parallel-mode --append -m unittest $(UNITTESTS)
python -m coverage combine
python -m coverage report --show-missing --rcfile=coverage.config --fail-under=80 --include='$(COVERED_FILES)'
check_convention:
pep8 . --max-line-length=109
uninstall:
-yes | sudo pip uninstall logbeam
-sudo rm -f /etc/bash_completion.d/logbeam.sh
sudo rm /usr/bin/logbeam
install:
-yes | sudo pip uninstall logbeam
python setup.py build
python setup.py bdist
python setup.py bdist_egg
sudo python setup.py install
sudo cp logbeam.sh /usr/bin/logbeam
sudo chmod 755 /usr/bin/logbeam
sudo cp bash.completion.sh /etc/bash_completion.d/logbeam.sh