subiquity/Makefile

62 lines
1.2 KiB
Makefile
Raw Normal View History

#
# Makefile for subiquity
#
NAME=subiquity
PYTHONSRC=$(NAME)
PYTHONPATH=$(shell pwd):$(shell pwd)/probert
PROBERTDIR=./probert
PROBERT_REPO=https://github.com/CanonicalLtd/probert
export PYTHONPATH
2018-05-21 19:00:41 +00:00
CWD := $(shell pwd)
ifneq (,$(MACHINE))
MACHARGS=--machine=$(MACHINE)
endif
.PHONY: run clean check
all: dryrun
2017-01-25 22:29:20 +00:00
install_deps:
sudo apt-get install -y python3-urwid python3-pyudev python3-nose python3-flake8 \
2018-02-15 00:27:56 +00:00
python3-yaml python3-coverage python3-dev pkg-config libnl-genl-3-dev \
2018-05-22 11:15:13 +00:00
libnl-route-3-dev python3-attr python3-distutils-extra python3-requests \
python3-requests-unixsocket
2018-02-14 22:40:50 +00:00
i18n:
python3 setup.py build
dryrun: probert i18n
2017-01-25 22:29:20 +00:00
$(MAKE) ui-view DRYRUN="--dry-run --uefi"
ui-view:
(bin/$(PYTHONSRC)-tui $(DRYRUN) $(MACHARGS))
ui-view-serial:
(TERM=att4424 bin/$(PYTHONSRC)-tui $(DRYRUN) --serial)
lint: pep8 pyflakes3
2018-05-21 19:52:38 +00:00
pep8:
@$(CWD)/scripts/run-pep8
2018-05-21 19:00:41 +00:00
pyflakes3:
@$(CWD)/scripts/run-pyflakes3
unit:
echo "Running unit tests..."
nosetests3 $(PYTHONSRC)/tests
check: lint unit
probert:
@if [ ! -d "$(PROBERTDIR)" ]; then \
git clone -q $(PROBERT_REPO) $(PROBERTDIR); \
2017-01-25 22:29:20 +00:00
(cd probert && python3 setup.py build_ext -i); \
fi
clean:
./debian/rules clean
.PHONY: lint pyflakes3 pep8