1.PHONY: tests 2 3tests: 4 -cd python2 && python2.4 httplib2test.py 5 -cd python2 && python2.5 httplib2test.py 6 -cd python2 && python2.6 httplib2test.py 7 -cd python2 && python2.6 httplib2test_appengine.py 8 cd python2 && python2.7 httplib2test.py 9 cd python2 && python2.7 httplib2test_appengine.py 10 cd python3 && python3 httplib2test.py 11 12VERSION = $(shell python setup.py --version) 13INLINE_VERSION = $(shell cd python2; python -c "import httplib2;print httplib2.__version__") 14INLINE_VERSION_3 = $(shell cd python3; ~/bin/python3 -c "import httplib2;print(httplib2.__version__)") 15DST = dist/httplib2-$(VERSION) 16 17release: 18 echo $(INLINE_VERSION_3) 19 echo $(INLINE_VERSION) 20 # Check for version number mismatch 21 if [ $(VERSION) -ne $(INLINE_VERSION_3) ]; then exit 1; fi 22 if [ $(VERSION) -ne $(INLINE_VERSION) ]; then exit 1; fi 23 24 -find . -name "*.pyc" | xargs rm 25 -find . -name "*.orig" | xargs rm 26 -rm -rf python2/.cache 27 -rm -rf python3/.cache 28 -mkdir dist 29 -rm -rf dist/httplib2-$(VERSION) 30 -rm dist/httplib2-$(VERSION).tar.gz 31 -rm dist/httplib2-$(VERSION).zip 32 -mkdir dist/httplib2-$(VERSION) 33 cp -r python2 $(DST) 34 cp -r python3 $(DST) 35 cp setup.py README.md MANIFEST.in CHANGELOG $(DST) 36 cd dist && tar -czv -f httplib2-$(VERSION).tar.gz httplib2-$(VERSION) 37 cd dist && zip httplib2-$(VERSION).zip -r httplib2-$(VERSION) 38 cd dist/httplib2-$(VERSION) && python setup.py sdist --formats=gztar,zip upload 39 wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py 40 python googlecode_upload.py --summary="Version $(shell python setup.py --version)" --project=httplib2 dist/*.tar.gz 41 python googlecode_upload.py --summary="Version $(shell python setup.py --version)" --project=httplib2 dist/*.zip 42 43docs: 44 pudge -v -f --modules=httplib2 --dest=build/doc 45