#!/usr/bin/env make

default: check test

pythonenv:
	virtualenv --no-site-packages pythonenv
	pythonenv/bin/pip install pep8 nose mock pylint

clean:
	rm -rf pythonenv *.egg-info dist build
	find . -name "*.pyc" -delete \
     -or -name "__pycache__" -delete
	rm -rf doc/_build

check: pythonenv
	pythonenv/bin/pep8 -r graygoo tests setup.py

test: pythonenv
	pythonenv/bin/nosetests -s

lint: pythonenv
	pythonenv/bin/pylint graygoo

vinstall: pythonenv
	pythonenv/bin/python setup.py install

doc:
	$(MAKE) -C doc html

upload_doc: doc
	rsync -avz doc/_build/html/* $$joemalik:/home/keppla/webroots/graygoo-doc

.PHONY: default clean check test lint vinstall doc
