From 4376eedc13acc74da94f5c4dfb52895042085489 Mon Sep 17 00:00:00 2001 From: Richard Harding Date: Tue, 17 Apr 2012 08:39:45 -0400 Subject: [PATCH 1/3] Add makefile testing, building, uploading. - Adds a makefile with helpers - make all will setup a virtualenv and get deps - make test will install test deps and run nosetests - make version_update will open the setup.py for updating version string - make upload will build and upload sdist to pypi --- Makefile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..222f850 --- /dev/null +++ b/Makefile @@ -0,0 +1,58 @@ +# Makefile to help automate tasks +WD := $(shell pwd) +PY := bin/python +PIP := bin/pip +PEP8 := bin/pep8 +NOSE := bin/nosetests + + +# ########### +# Tests rule! +# ########### +.PHONY: test +test: venv develop $(NOSE) + $(NOSE) --with-id -s tests + +$(NOSE): + $(PIP) install nose pep8 coverage + +# ####### +# INSTALL +# ####### +.PHONY: all +all: venv develop + +venv: bin/python +bin/python: + virtualenv . + +.PHONY: clean_venv +clean_venv: + rm -rf bin include lib local man + +develop: lib/python*/site-packages/bookie-api.egg-link +lib/python*/site-packages/bookie-api.egg-link: + $(PY) setup.py develop + + +# ########### +# Development +# ########### +.PHONY: clean_all +clean_all: clean_venv + + +# ########### +# Deploy +# ########### +.PHONY: dist +dist: + $(PY) setup.py sdist + +.PHONY: upload +upload: + $(PY) setup.py sdist upload + +.PHONY: version_update +version_update: + $(EDITOR) setup.py From 82804b664de96eebab5740aca6b964f1ebbd40fe Mon Sep 17 00:00:00 2001 From: Richard Harding Date: Tue, 17 Apr 2012 08:37:51 -0400 Subject: [PATCH 2/3] Update .gitignore file for venv and nosetests. --- .gitignore | 9 ++++++++- Makefile | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fb310c9..84fca1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,11 @@ *.pyc +*.egg-info build dist -readability_lxml.egg-info +/bin +/include +/lib +/local +/man +nosetests.xml +.coverage diff --git a/Makefile b/Makefile index 222f850..685111f 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,11 @@ bin/python: .PHONY: clean_venv clean_venv: +<<<<<<< HEAD rm -rf bin include lib local man +======= + rm -rf lib include local bin man +>>>>>>> 521eea5... ls develop: lib/python*/site-packages/bookie-api.egg-link lib/python*/site-packages/bookie-api.egg-link: From b8fc399fac4e23ee8a7860d156ff89bd69ee751c Mon Sep 17 00:00:00 2001 From: Richard Harding Date: Tue, 17 Apr 2012 09:20:23 -0400 Subject: [PATCH 3/3] Fix rebase issue in the Makefile --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 685111f..222f850 100644 --- a/Makefile +++ b/Makefile @@ -28,11 +28,7 @@ bin/python: .PHONY: clean_venv clean_venv: -<<<<<<< HEAD rm -rf bin include lib local man -======= - rm -rf lib include local bin man ->>>>>>> 521eea5... ls develop: lib/python*/site-packages/bookie-api.egg-link lib/python*/site-packages/bookie-api.egg-link: