forked from T3kton/subcontractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (40 loc) · 1.31 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
VERSION := $(shell head -n 1 debian/changelog | awk '{match( $$0, /\(.+?\)/); print substr( $$0, RSTART+1, RLENGTH-2 ) }' | cut -d- -f1 )
all:
./setup.py build
install:
mkdir -p $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/etc
install -m 755 bin/* $(DESTDIR)/usr/bin
install -m 644 subcontractor.conf.sample $(DESTDIR)/etc/
./setup.py install --root=$(DESTDIR) --install-purelib=/usr/lib/python3/dist-packages/ --prefix=/usr --no-compile -O0
version:
echo $(VERSION)
clean:
./setup.py clean || true
$(RM) -r build
$(RM) dpkg
$(RM) -r htmlcov
dh_clean || true
find -name *.pyc -delete
find -name __pycache__ -delete
dist-clean: cleane
.PHONY:: all install version clean dist-clean
test-blueprints:
echo ubuntu-focal-base
test-requires:
echo flake8 python3-pytest python3-pytest-cov python3-pytest-django python3-pytest-mock
lint:
flake8 --ignore=E501,E201,E202,E111,E126,E114,E402 --statistics .
test:
py.test-3 -x --cov=subcontractor --cov-report html --cov-report term -vv subcontractor
.PHONY:: test-blueprints test-requires test
dpkg-blueprints:
echo ubuntu-focal-base
dpkg-requires:
echo dpkg-dev debhelper python3-dev python3-setuptools dh-python
dpkg:
dpkg-buildpackage -b -us -uc
touch dpkg
dpkg-file:
echo $(shell ls ../subcontractor_*.deb):focal
.PHONY:: dpkg-blueprints dpkg-requires dpkg dpkg-file