Source

virtualenvwrapper / Makefile

Full commit
Doug Hellmann 47fc1be 
Doug Hellmann 2b3d8f9 
Doug Hellmann 8116bee 
Doug Hellmann 27085d7 








Doug Hellmann 9ee144c 

Doug Hellmann 8fc5faa 



Doug Hellmann 1aec34f 
Doug Hellmann 8fc5faa 



Doug Hellmann b81915a 
Doug Hellmann 8fc5faa 

Doug Hellmann b36513a 
Doug Hellmann 8116bee 
Doug Hellmann 2ba759a 
Doug Hellmann fe25bab 
Doug Hellmann 8116bee 
Doug Hellmann 2ba759a 
Doug Hellmann 8116bee 
Doug Hellmann 47fc1be 
Doug Hellmann b36513a 
Doug Hellmann 8116bee 
Doug Hellmann 1aec34f 
Manuel Kaufmann 18a5871 
Doug Hellmann b36513a 
Doug Hellmann 1aec34f 



Doug Hellmann 47fc1be 
Doug Hellmann 2b3d8f9 
Doug Hellmann dcb9dc5 

Doug Hellmann 47fc1be 
Doug Hellmann 1aec34f 
Manuel Kaufmann 154f83f 
Doug Hellmann 2b3d8f9 
Doug Hellmann 47fc1be 
Doug Hellmann 6ffe4a3 

Doug Hellmann 47fc1be 
Doug Hellmann d26d179 




Doug Hellmann 47fc1be 
Doug Hellmann b36513a 

Doug Hellmann 9ee144c 




Doug Hellmann 3d181d1 


Doug Hellmann b36513a 
Doug Hellmann 9ee144c 

Doug Hellmann b36513a 



Doug Hellmann 27085d7 



Doug Hellmann b36513a 
Doug Hellmann 27085d7 





Doug Hellmann 9ee144c 
Doug Hellmann 27085d7 




Doug Hellmann b36513a 
Doug Hellmann ffd9d36 
Doug Hellmann 27085d7 


Doug Hellmann ffd9d36 
Manuel Kaufmann 18a5871 
# Get the version of the app.  This is used in the doc build.
export VERSION=$(shell python setup.py --version)

# The main version of Python supported.
PRIMARY_PYTHON_VERSION=2.6

# The test-quick pattern changes the definition of
# this variable to only run against a single version of python.
ifeq ($(SUPPORTED_PYTHON_VERSIONS),)
SUPPORTED_PYTHON_VERSIONS=2.5 2.6
endif

SUPPORTED_SHELLS=bash sh ksh zsh

# Default target is to show help
help:
	@echo "sdist          - Source distribution"
	@echo "html           - HTML documentation"
	@echo "docclean       - Remove documentation build files"
	@echo "register       - register a new release on PyPI"
	@echo "website        - build web version of docs"
	@echo "installwebsite - deploy web version of docs"
	@echo "develop        - install development version"
	@echo "test           - run the test suite"


.PHONY: sdist
sdist: html
	rm -f dist/*.gz
	rm -rf docs/website
	python setup.py sdist
	cp -v dist/*.gz ~/Desktop

# Documentation
.PHONY: html
html:
	(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg" LANGUAGE="en")
	(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg" LANGUAGE="es")

.PHONY: docclean
docclean:
	rm -rf docs/build docs/html

# Website copy of documentation
.PHONY: website
website: 
	[ ~/Devel/doughellmann/doughellmann/templates/base.html -nt docs/sphinx/web/templates/base.html ] && (echo "Updating base.html" ; cp ~/Devel/doughellmann/doughellmann/templates/base.html docs/sphinx/web/templates/base.html) || exit 0
	rm -rf docs/website
	(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/en" LANGUAGE="en")
	(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/es" LANGUAGE="es")

installwebsite: website
	(cd docs/website/en && rsync --rsh=ssh --archive --delete --verbose . www.doughellmann.com:/var/www/doughellmann/DocumentRoot/docs/virtualenvwrapper/)
	(cd docs/website/es && rsync --rsh=ssh --archive --delete --verbose . www.doughellmann.com:/var/www/doughellmann/DocumentRoot/docs/virtualenvwrapper/es/)

# Register the new version on pypi
.PHONY: register
register:
	python setup.py register

# Testing
TEST_SCRIPTS=$(wildcard tests/test*.sh)

test:
	for name in $(SUPPORTED_SHELLS) ; do \
		$(MAKE) test-$$name || exit 1 ; \
	done
	$(MAKE) test-install

develop:
	python setup.py develop

test-%:
	TEST_SHELL=$(subst test-,,$@) $(MAKE) test-loop

test-zsh:
	TEST_SHELL="zsh -o shwordsplit" $(MAKE) test-loop

# For each supported version of Python,
# - Create a new virtualenv in a temporary directory.
# - Install virtualenvwrapper into the new virtualenv
# - Run each test script in tests
test-loop:
	for py_ver in $(SUPPORTED_PYTHON_VERSIONS) ; do \
		(cd $$TMPDIR/ && rm -rf virtualenvwrapper-test-env \
			&& virtualenv -p /Library/Frameworks/Python.framework/Versions/$$py_ver/bin/python$$py_ver --no-site-packages virtualenvwrapper-test-env) \
			|| exit 1 ; \
		$$TMPDIR/virtualenvwrapper-test-env/bin/python setup.py install || exit 1 ; \
		for test_script in $(wildcard tests/test*.sh) ; do \
			echo ; \
	 		echo '********************************************************************************' ; \
			echo "Running $$test_script with $(TEST_SHELL) under Python $$py_ver" ; \
			VIRTUALENVWRAPPER_PYTHON=$$TMPDIR/virtualenvwrapper-test-env/bin/python SHUNIT_PARENT=$$test_script $(TEST_SHELL) $$test_script || exit 1 ; \
			echo ; \
		done \
	done

test-quick:
	SUPPORTED_PYTHON_VERSIONS=$(PRIMARY_PYTHON_VERSION) $(MAKE) test-bash

test-install:
	bash ./tests/manual_test_install.sh `pwd`/dist "$(VERSION)"