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
|
# Copyright 2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
PYTHON := python
define apt-get
sudo DEBIAN_FRONTEND=noninteractive \
apt-get --assume-yes --no-install-recommends
endef
build: bin/python bin/pip requirements.txt
bin/pip install --requirement=requirements.txt
dist: bin/python setup.py
bin/python setup.py egg_info -r sdist
test: bin/python setup.py
bin/python setup.py test
clean:
$(RM) -r bin build dist include lib local TAGS tags
find . -name '*.py[co]' -print0 | xargs -r0 $(RM) -r
find . -name '*.egg' -print0 | xargs -r0 $(RM) -r
find . -name '*.egg-info' -print0 | xargs -r0 $(RM) -r
find . -name '*~' -print0 | xargs -r0 $(RM)
lint: bin/flake8
@bin/flake8 maastest
bin/flake8: bin/python bin/pip
@bin/pip install -q flake8
bin/python bin/pip:
virtualenv --python=$(PYTHON) --system-site-packages $(PWD)
install-dependencies: packages.txt
@xargs --verbose --no-run-if-empty $(apt-get) install < packages.txt
.PHONY: build dist clean install-dependencies lint test
|