~niedbalski/charm-helpers/add-source-check-exists

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
PROJECT=charmhelpers
PYTHON := /usr/bin/env python
SUITE=unstable
TESTS=tests/

all:
	@echo "make source - Create source package"
	@echo "make sdeb - Create debian source package"
	@echo "make deb - Create debian package"
	@echo "make clean"
	@echo "make userinstall - Install locally"

sdeb: source
	scripts/build source

deb: source
	scripts/build

source: setup.py
	scripts/update-revno
	python setup.py sdist

clean:
	python setup.py clean
	rm -rf build/ MANIFEST
	find . -name '*.pyc' -delete
	rm -rf dist/*
	dh_clean

userinstall:
	scripts/update-revno
	python setup.py install --user

test:
	@echo Starting tests...
	@$(PYTHON) /usr/bin/nosetests --nologcapture tests/

ftest:
	@echo Starting fast tests...
	@$(PYTHON) /usr/bin/nosetests --attr '!slow' --nologcapture tests/

lint:
	@echo Checking for Python syntax...
	@flake8 --ignore=E123,E501 $(PROJECT) $(TESTS) && echo OK

build: test lint