← Back to team overview

txaws-dev team mailing list archive

[Merge] lp:~oubiwann/txaws/919862-add-makefile into lp:txaws

 

Duncan McGreggor has proposed merging lp:~oubiwann/txaws/919862-add-makefile into lp:txaws.

Requested reviews:
  txAWS Technical List (txaws-tech)
Related bugs:
  Bug #919862 in txAWS: "It would be nice to have a Makefile for common dev operations"
  https://bugs.launchpad.net/txaws/+bug/919862

For more details, see:
https://code.launchpad.net/~oubiwann/txaws/919862-add-makefile/+merge/90010

Note that this has already been reviewed and approved; see: https://code.launchpad.net/~oubiwann/txaws/919862-add-makefile-old

This branch was created to fix some bad author info in a series of commits. I did the following:
 * renamed the original branch to 919862-add-makefile-old
 * used the git bzr tool to import the bzr branch to git
 * used git to change the author
 * pushed the newly changed (correct author email addresses) branch to 919862-add-makefile
-- 
https://code.launchpad.net/~oubiwann/txaws/919862-add-makefile/+merge/90010
Your team txAWS Technical List is requested to review the proposed merge of lp:~oubiwann/txaws/919862-add-makefile into lp:txaws.
=== modified file '.bzrignore'
--- .bzrignore	2012-01-18 15:00:32 +0000
+++ .bzrignore	2012-01-24 22:36:35 +0000
@@ -1,2 +1,3 @@
 _trial_temp*
 .testrepository
+.venv-*

=== added file 'Makefile'
--- Makefile	1970-01-01 00:00:00 +0000
+++ Makefile	2012-01-24 22:36:35 +0000
@@ -0,0 +1,126 @@
+PLATFORM = $(shell uname)
+ifeq ($(PLATFORM), Darwin)
+PYBIN = Python
+else
+PYBIN = python
+endif
+
+
+check-pybin:
+	echo "$(PYBIN)"
+
+version:
+	@python -c "from txaws import version;print version.txaws;"
+
+
+clean:
+	find ./ -name "*~" -exec rm {} \;
+	find ./ -name "*.pyc" -exec rm {} \;
+	find ./ -name "*.pyo" -exec rm {} \;
+	find . -name "*.sw[op]" -exec rm {} \;
+	rm -rf _trial_temp/ build/ dist/ MANIFEST *.egg-info
+
+
+build:
+	@python setup.py build
+	@python setup.py sdist
+
+
+virtual-dir-setup: VERSION ?= 2.7
+virtual-dir-setup:
+	-@test -d .venv-$(VERSION) || virtualenv -p $(PYBIN)$(VERSION) .venv-$(VERSION)
+	-@test -e .venv-$(VERSION)/bin/twistd || . .venv-$(VERSION)/bin/activate && pip install twisted
+	-@test -e .venv-$(VERSION)/bin/pep8 || . .venv-$(VERSION)/bin/activate && pip install pep8
+	-@test -e .venv-$(VERSION)/bin/pyflakes || . .venv-$(VERSION)/bin/activate && pip install pyflakes
+	-. .venv-$(VERSION)/bin/activate && pip install lxml
+	-. .venv-$(VERSION)/bin/activate && pip install PyOpenSSL
+	-. .venv-$(VERSION)/bin/activate && pip install venusian
+	-. .venv-$(VERSION)/bin/activate && pip install 'python-dateutil<2.0'
+
+
+virtual-builds:
+	-@test -e "`which $(PYBIN)2.5`" && VERSION=2.5 make virtual-dir-setup || echo "Couldn't find $(PYBIN)2.5"
+	-@test -e "`which $(PYBIN)2.6`" && VERSION=2.6 make virtual-dir-setup || echo "Couldn't find $(PYBIN)2.6"
+	-@test -e "`which $(PYBIN)2.7`" && VERSION=2.7 make virtual-dir-setup || echo "Couldn't find $(PYBIN)2.7"
+
+
+virtual-trial: VERSION ?= 2.7
+virtual-trial:
+	-. .venv-$(VERSION)/bin/activate && trial ./txaws
+
+
+virtual-pep8: VERSION ?= 2.7
+virtual-pep8:
+	-. .venv-$(VERSION)/bin/activate && pep8 ./txaws
+
+
+virtual-pyflakes: VERSION ?= 2.7
+virtual-pyflakes:
+	-. .venv-$(VERSION)/bin/activate && pyflakes ./txaws
+
+
+virtual-check: VERSION ?= 2.7
+virtual-check:
+	-VERSION=$(VERSION) make virtual-trial
+	-VERSION=$(VERSION) make virtual-pep8
+	-VERSION=$(VERSION) make virtual-pyflakes
+
+
+virtual-setup-build: VERSION ?= 2.7
+virtual-setup-build:
+	-@. .venv-$(VERSION)/bin/activate && python setup.py build
+	-@. .venv-$(VERSION)/bin/activate && python setup.py sdist
+
+
+virtual-setup-builds: VERSION ?= 2.7
+virtual-setup-builds: virtual-builds
+	-@test -e "`which python2.5`" && VERSION=2.5 make virtual-setup-build
+	-@test -e "`which python2.6`" && VERSION=2.6 make virtual-setup-build
+	-@test -e "`which python2.7`" && VERSION=2.7 make virtual-setup-build
+
+
+virtual-checks: virtual-setup-builds
+	-@test -e "`which python2.5`" && VERSION=2.5 make virtual-check
+	-@test -e "`which python2.6`" && VERSION=2.6 make virtual-check
+	-@test -e "`which python2.7`" && VERSION=2.7 make virtual-check
+
+
+virtual-uninstall: VERSION ?= 2.7
+virtual-uninstall: PACKAGE ?= ""
+virtual-uninstall:
+	-. .venv-$(VERSION)/bin/activate && pip uninstall $(PACKAGE)
+
+
+virtual-uninstalls: PACKAGE ?= ""
+virtual-uninstalls:
+	-@test -e "`which python2.5`" && VERSION=2.5 PACKAGE=$(PACKAGE) make virtual-uninstall
+	-@test -e "`which python2.6`" && VERSION=2.6 PACKAGE=$(PACKAGE) make virtual-uninstall
+	-@test -e "`which python2.7`" && VERSION=2.7 PACKAGE=$(PACKAGE) make virtual-uninstall
+
+
+virtual-dir-remove: VERSION ?= 2.7
+virtual-dir-remove:
+	rm -rfv .venv-$(VERSION)
+
+
+clean-virtual-builds: clean
+	@VERSION=2.5 make virtual-dir-remove
+	@VERSION=2.6 make virtual-dir-remove
+	@VERSION=2.7 make virtual-dir-remove
+
+
+virtual-build-clean: clean-virtual-builds build virtual-builds
+.PHONY: virtual-build-clean
+
+
+check: MOD ?= txaws
+check: build
+	trial ./txaws
+
+
+register:
+	python setup.py register
+
+
+upload: check build
+	python setup.py sdist upload --show-response


Follow ups