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 | 8b4c173 | 2011-12-06 11:28:29 -0500 | [diff] [blame] | 7 | python runtests.py tests/test_discovery.py |
| 8 | python runtests.py tests/test_errors.py |
| 9 | python runtests.py tests/test_http.py |
| 10 | python runtests.py tests/test_json_model.py |
| 11 | python runtests.py tests/test_mocks.py |
| 12 | python runtests.py tests/test_model.py |
| 13 | python runtests.py tests/test_oauth2client_clientsecrets.py |
| 14 | python runtests.py tests/test_oauth2client_django_orm.py |
| 15 | python runtests.py tests/test_oauth2client_file.py |
| 16 | python runtests.py tests/test_oauth2client_jwt.py |
| 17 | python runtests.py tests/test_oauth2client.py |
| 18 | python runtests.py tests/test_oauth.py |
| 19 | python runtests.py tests/test_protobuf_model.py |
Joe Gregorio | 549230c | 2012-01-11 10:38:05 -0500 | [diff] [blame] | 20 | python runtests.py tests/test_schema.py |
Joe Gregorio | 8b4c173 | 2011-12-06 11:28:29 -0500 | [diff] [blame] | 21 | python runtests.py tests/test_oauth2client_appengine.py |
Joe Gregorio | 9ce4b62 | 2011-02-17 15:32:11 -0500 | [diff] [blame] | 22 | |
Joe Gregorio | 08cdcb8 | 2012-03-14 00:09:33 -0400 | [diff] [blame] | 23 | |
| 24 | .PHONY: coverage |
| 25 | coverage: |
| 26 | coverage erase |
| 27 | find tests -name "test_*.py" | xargs --max-args=1 coverage run -a runtests.py |
| 28 | coverage report |
| 29 | coverage html |
| 30 | |
Joe Gregorio | 9ce4b62 | 2011-02-17 15:32:11 -0500 | [diff] [blame] | 31 | .PHONY: docs |
| 32 | docs: |
| 33 | cd docs; ./build.sh |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 34 | python describe.py |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 35 | |
| 36 | .PHONY: prerelease |
| 37 | prerelease: |
Joe Gregorio | 01b9270 | 2011-03-23 21:44:42 -0400 | [diff] [blame] | 38 | python2.6 runtests.py tests --exit_on_failure |
| 39 | python2.7 runtests.py tests --exit_on_failure |
Joe Gregorio | b17c763 | 2011-04-05 01:31:55 -0400 | [diff] [blame] | 40 | -sudo rm -rf dist/ |
| 41 | -sudo rm -rf snapshot/ |
| 42 | python expand-symlinks.py |
| 43 | cd snapshot; python setup.py clean |
| 44 | cd snapshot; python setup.py sdist --formats=gztar,zip |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 45 | |
| 46 | .PHONY: release |
| 47 | release: prerelease |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 48 | @echo "This target will upload a new release to PyPi and code.google.com hosting." |
| 49 | @echo "Are you sure you want to proceed? (yes/no)" |
Joe Gregorio | ece1da3 | 2012-03-02 13:33:09 -0800 | [diff] [blame] | 50 | @read yn; if [ yes -ne $(yn) ]; then exit 1; fi |
Joe Gregorio | 9384170 | 2011-03-02 16:12:05 -0800 | [diff] [blame] | 51 | @echo "Here we go..." |
Joe Gregorio | b17c763 | 2011-04-05 01:31:55 -0400 | [diff] [blame] | 52 | cd snapshot; python setup.py sdist --formats=gztar,zip register upload |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 53 | 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] | 54 | python googlecode_upload.py --summary="google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz |
| 55 | 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 | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 56 | |
| 57 | |
| 58 | .PHONY: oauth2_prerelease |
| 59 | oauth2_prerelease: |
| 60 | -sudo rm -rf dist/ |
| 61 | -sudo rm -rf snapshot/ |
| 62 | mkdir snapshot |
| 63 | python expand-symlinks.py --source=oauth2client --dest=snapshot/oauth2client |
Joe Gregorio | 17afeb1 | 2011-12-15 09:42:12 -0500 | [diff] [blame] | 64 | python expand-symlinks.py --source=samples/dailymotion --dest=snapshot/samples/dailymotion |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 65 | python expand-symlinks.py --source=samples/appengine --dest=snapshot/samples/appengine |
Joe Gregorio | 17afeb1 | 2011-12-15 09:42:12 -0500 | [diff] [blame] | 66 | python expand-symlinks.py --source=samples/django_sample --dest=snapshot/django_sample |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 67 | cp setup_oauth2client.py snapshot/setup.py |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 68 | cp MANIFEST_oauth2client.in snapshot/MANIFEST.in |
| 69 | cp README_oauth2client snapshot/README |
| 70 | cd snapshot; python setup.py clean |
| 71 | cd snapshot; python setup.py sdist --formats=gztar,zip |
| 72 | |
| 73 | .PHONY: oauth2_release |
| 74 | oauth2_release: oauth2_prerelease |
| 75 | @echo "This target will upload a new release to PyPi and code.google.com hosting." |
| 76 | @echo "Are you sure you want to proceed? (yes/no)" |
Joe Gregorio | ece1da3 | 2012-03-02 13:33:09 -0800 | [diff] [blame] | 77 | @read yn; if [ yes -ne $(yn) ]; then exit 1; fi |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 78 | @echo "Here we go..." |
| 79 | cd snapshot; python setup.py sdist --formats=gztar,zip register upload |
| 80 | 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] | 81 | python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz |
| 82 | python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.zip |