Joe Gregorio | 58b9594 | 2010-12-09 15:04:29 -0500 | [diff] [blame] | 1 | pep8: |
Joe Gregorio | 0fb19e1 | 2011-02-22 07:53:24 -0500 | [diff] [blame] | 2 | find apiclient samples -name "*.py" | xargs pep8 --ignore=E111,E202 |
Joe Gregorio | ba9ea7f | 2010-08-19 15:49:04 -0400 | [diff] [blame] | 3 | |
Joe Gregorio | 8b4c173 | 2011-12-06 11:28:29 -0500 | [diff] [blame] | 4 | APP_ENGINE_PATH=../google_appengine |
| 5 | |
Joe Gregorio | 58b9594 | 2010-12-09 15:04:29 -0500 | [diff] [blame] | 6 | test: |
Joe Gregorio | 696583c | 2012-03-21 15:20:51 -0400 | [diff] [blame] | 7 | ./runtests.sh python2.6 |
| 8 | ./runtests.sh python2.7 |
Joe Gregorio | 9ce4b62 | 2011-02-17 15:32:11 -0500 | [diff] [blame] | 9 | |
Joe Gregorio | 08cdcb8 | 2012-03-14 00:09:33 -0400 | [diff] [blame] | 10 | |
| 11 | .PHONY: coverage |
| 12 | coverage: |
| 13 | coverage erase |
| 14 | find tests -name "test_*.py" | xargs --max-args=1 coverage run -a runtests.py |
| 15 | coverage report |
| 16 | coverage html |
| 17 | |
Joe Gregorio | 9ce4b62 | 2011-02-17 15:32:11 -0500 | [diff] [blame] | 18 | .PHONY: docs |
| 19 | docs: |
| 20 | cd docs; ./build.sh |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 21 | python describe.py |
Joe Gregorio | df70dfc | 2012-04-23 08:31:37 -0400 | [diff] [blame] | 22 | python samples-index.py > ../google-api-python-client.wiki/SampleApps.wiki |
Joe Gregorio | 9d56b5a | 2012-03-30 09:21:26 -0400 | [diff] [blame] | 23 | |
| 24 | .PHONY: wiki |
| 25 | wiki: |
| 26 | python samples-index.py > ../google-api-python-client.wiki/SampleApps.wiki |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 27 | |
| 28 | .PHONY: prerelease |
| 29 | prerelease: |
Joe Gregorio | 696583c | 2012-03-21 15:20:51 -0400 | [diff] [blame] | 30 | ./runtests.sh python2.6 |
| 31 | ./runtests.sh python2.7 |
Joe Gregorio | f0edebc | 2012-08-29 12:33:05 -0400 | [diff] [blame^] | 32 | -rm -rf dist/ |
Joe Gregorio | b17c763 | 2011-04-05 01:31:55 -0400 | [diff] [blame] | 33 | -sudo rm -rf dist/ |
Joe Gregorio | f0edebc | 2012-08-29 12:33:05 -0400 | [diff] [blame^] | 34 | -rm -rf snapshot/ |
Joe Gregorio | b17c763 | 2011-04-05 01:31:55 -0400 | [diff] [blame] | 35 | -sudo rm -rf snapshot/ |
Joe Gregorio | f0edebc | 2012-08-29 12:33:05 -0400 | [diff] [blame^] | 36 | ./tools/gae-zip-creator.sh |
Joe Gregorio | b17c763 | 2011-04-05 01:31:55 -0400 | [diff] [blame] | 37 | python expand-symlinks.py |
| 38 | cd snapshot; python setup.py clean |
| 39 | cd snapshot; python setup.py sdist --formats=gztar,zip |
Joe Gregorio | 46675d2 | 2012-06-20 12:15:24 -0400 | [diff] [blame] | 40 | cd snapshot; tar czf google-api-python-client-samples-$(shell python setup.py --version).tar.gz samples |
| 41 | cd snapshot; zip -r google-api-python-client-samples-$(shell python setup.py --version).zip samples |
| 42 | |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 43 | |
| 44 | .PHONY: release |
| 45 | release: prerelease |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 46 | @echo "This target will upload a new release to PyPi and code.google.com hosting." |
| 47 | @echo "Are you sure you want to proceed? (yes/no)" |
Joe Gregorio | ece1da3 | 2012-03-02 13:33:09 -0800 | [diff] [blame] | 48 | @read yn; if [ yes -ne $(yn) ]; then exit 1; fi |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 49 | @echo "Here we go..." |
Joe Gregorio | b17c763 | 2011-04-05 01:31:55 -0400 | [diff] [blame] | 50 | cd snapshot; python setup.py sdist --formats=gztar,zip register upload |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 51 | wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py |
Joe Gregorio | 1daa71b | 2011-09-15 18:12:14 -0400 | [diff] [blame] | 52 | python googlecode_upload.py --summary="google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz |
| 53 | python googlecode_upload.py --summary="google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.zip |
Joe Gregorio | f0edebc | 2012-08-29 12:33:05 -0400 | [diff] [blame^] | 54 | python googlecode_upload.py --summary="Full Dependecies Build for Google App Engine Projects Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/gae/*.zip |
Joe Gregorio | 46675d2 | 2012-06-20 12:15:24 -0400 | [diff] [blame] | 55 | python googlecode_upload.py --summary="Samples for google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/google-api-python-client-samples-*.tar.gz |
| 56 | python googlecode_upload.py --summary="Samples for google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/google-api-python-client-samples-*.zip |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 57 | |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 58 | .PHONY: oauth2_prerelease |
| 59 | oauth2_prerelease: |
Joe Gregorio | f0edebc | 2012-08-29 12:33:05 -0400 | [diff] [blame^] | 60 | -rm -rf dist/ |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 61 | -sudo rm -rf dist/ |
Joe Gregorio | f0edebc | 2012-08-29 12:33:05 -0400 | [diff] [blame^] | 62 | -rm -rf snapshot/ |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 63 | -sudo rm -rf snapshot/ |
| 64 | mkdir snapshot |
| 65 | python expand-symlinks.py --source=oauth2client --dest=snapshot/oauth2client |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 66 | cp setup_oauth2client.py snapshot/setup.py |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 67 | cp MANIFEST_oauth2client.in snapshot/MANIFEST.in |
| 68 | cp README_oauth2client snapshot/README |
| 69 | cd snapshot; python setup.py clean |
| 70 | cd snapshot; python setup.py sdist --formats=gztar,zip |
| 71 | |
| 72 | .PHONY: oauth2_release |
| 73 | oauth2_release: oauth2_prerelease |
| 74 | @echo "This target will upload a new release to PyPi and code.google.com hosting." |
| 75 | @echo "Are you sure you want to proceed? (yes/no)" |
Joe Gregorio | ece1da3 | 2012-03-02 13:33:09 -0800 | [diff] [blame] | 76 | @read yn; if [ yes -ne $(yn) ]; then exit 1; fi |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 77 | @echo "Here we go..." |
| 78 | cd snapshot; python setup.py sdist --formats=gztar,zip register upload |
| 79 | wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py |
Joe Gregorio | 1daa71b | 2011-09-15 18:12:14 -0400 | [diff] [blame] | 80 | python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz |
| 81 | python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.zip |