blob: 9206715769b31f07be7a3aedd2ff2a3e5c6db296 [file] [log] [blame]
Joe Gregorio58b95942010-12-09 15:04:29 -05001pep8:
Joe Gregorio0fb19e12011-02-22 07:53:24 -05002 find apiclient samples -name "*.py" | xargs pep8 --ignore=E111,E202
Joe Gregorioba9ea7f2010-08-19 15:49:04 -04003
Joe Gregorio8b4c1732011-12-06 11:28:29 -05004APP_ENGINE_PATH=../google_appengine
5
Joe Gregorio58b95942010-12-09 15:04:29 -05006test:
Joe Gregorio8b4c1732011-12-06 11:28:29 -05007 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 Gregorio549230c2012-01-11 10:38:05 -050020 python runtests.py tests/test_schema.py
Joe Gregorio8b4c1732011-12-06 11:28:29 -050021 python runtests.py tests/test_oauth2client_appengine.py
Joe Gregorio9ce4b622011-02-17 15:32:11 -050022
Joe Gregorio08cdcb82012-03-14 00:09:33 -040023
24.PHONY: coverage
25coverage:
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 Gregorio9ce4b622011-02-17 15:32:11 -050031.PHONY: docs
32docs:
33 cd docs; ./build.sh
Joe Gregorioafc45f22011-02-20 16:11:28 -050034 python describe.py
Joe Gregorio6429bf62011-03-01 22:53:21 -080035
36.PHONY: prerelease
37prerelease:
Joe Gregorio01b92702011-03-23 21:44:42 -040038 python2.6 runtests.py tests --exit_on_failure
39 python2.7 runtests.py tests --exit_on_failure
Joe Gregoriob17c7632011-04-05 01:31:55 -040040 -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 Gregorio6429bf62011-03-01 22:53:21 -080045
46.PHONY: release
47release: prerelease
Joe Gregorio93841702011-03-02 16:12:05 -080048 @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 Gregorioece1da32012-03-02 13:33:09 -080050 @read yn; if [ yes -ne $(yn) ]; then exit 1; fi
Joe Gregorio93841702011-03-02 16:12:05 -080051 @echo "Here we go..."
Joe Gregoriob17c7632011-04-05 01:31:55 -040052 cd snapshot; python setup.py sdist --formats=gztar,zip register upload
Joe Gregorio6429bf62011-03-01 22:53:21 -080053 wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py
Joe Gregorio1daa71b2011-09-15 18:12:14 -040054 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 Gregorioc47fab72011-07-06 08:29:20 -040056
57
58.PHONY: oauth2_prerelease
59oauth2_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 Gregorio17afeb12011-12-15 09:42:12 -050064 python expand-symlinks.py --source=samples/dailymotion --dest=snapshot/samples/dailymotion
Joe Gregorioc47fab72011-07-06 08:29:20 -040065 python expand-symlinks.py --source=samples/appengine --dest=snapshot/samples/appengine
Joe Gregorio17afeb12011-12-15 09:42:12 -050066 python expand-symlinks.py --source=samples/django_sample --dest=snapshot/django_sample
Joe Gregorioc47fab72011-07-06 08:29:20 -040067 cp setup_oauth2client.py snapshot/setup.py
Joe Gregorioc47fab72011-07-06 08:29:20 -040068 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
74oauth2_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 Gregorioece1da32012-03-02 13:33:09 -080077 @read yn; if [ yes -ne $(yn) ]; then exit 1; fi
Joe Gregorioc47fab72011-07-06 08:29:20 -040078 @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 Gregorio1daa71b2011-09-15 18:12:14 -040081 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