blob: f4881133a8de0ee20bf1b603eae29e4504c949d8 [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 Gregorio696583c2012-03-21 15:20:51 -04007 ./runtests.sh python2.6
8 ./runtests.sh python2.7
Joe Gregorio9ce4b622011-02-17 15:32:11 -05009
Joe Gregorio08cdcb82012-03-14 00:09:33 -040010
11.PHONY: coverage
12coverage:
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 Gregorio9ce4b622011-02-17 15:32:11 -050018.PHONY: docs
19docs:
20 cd docs; ./build.sh
Joe Gregorioafc45f22011-02-20 16:11:28 -050021 python describe.py
Joe Gregoriodf70dfc2012-04-23 08:31:37 -040022 python samples-index.py > ../google-api-python-client.wiki/SampleApps.wiki
Joe Gregorio9d56b5a2012-03-30 09:21:26 -040023
24.PHONY: wiki
25wiki:
26 python samples-index.py > ../google-api-python-client.wiki/SampleApps.wiki
Joe Gregorio6429bf62011-03-01 22:53:21 -080027
28.PHONY: prerelease
29prerelease:
Joe Gregorio696583c2012-03-21 15:20:51 -040030 ./runtests.sh python2.6
31 ./runtests.sh python2.7
Joe Gregoriob17c7632011-04-05 01:31:55 -040032 -sudo rm -rf dist/
33 -sudo rm -rf snapshot/
34 python expand-symlinks.py
35 cd snapshot; python setup.py clean
36 cd snapshot; python setup.py sdist --formats=gztar,zip
Joe Gregorio6429bf62011-03-01 22:53:21 -080037
38.PHONY: release
39release: prerelease
Joe Gregorio93841702011-03-02 16:12:05 -080040 @echo "This target will upload a new release to PyPi and code.google.com hosting."
41 @echo "Are you sure you want to proceed? (yes/no)"
Joe Gregorioece1da32012-03-02 13:33:09 -080042 @read yn; if [ yes -ne $(yn) ]; then exit 1; fi
Joe Gregorio93841702011-03-02 16:12:05 -080043 @echo "Here we go..."
Joe Gregoriob17c7632011-04-05 01:31:55 -040044 cd snapshot; python setup.py sdist --formats=gztar,zip register upload
Joe Gregorio6429bf62011-03-01 22:53:21 -080045 wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py
Joe Gregorio1daa71b2011-09-15 18:12:14 -040046 python googlecode_upload.py --summary="google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz
47 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 -040048
Joe Gregorioc47fab72011-07-06 08:29:20 -040049.PHONY: oauth2_prerelease
50oauth2_prerelease:
51 -sudo rm -rf dist/
52 -sudo rm -rf snapshot/
53 mkdir snapshot
54 python expand-symlinks.py --source=oauth2client --dest=snapshot/oauth2client
Joe Gregorio17afeb12011-12-15 09:42:12 -050055 python expand-symlinks.py --source=samples/dailymotion --dest=snapshot/samples/dailymotion
Joe Gregorioc47fab72011-07-06 08:29:20 -040056 python expand-symlinks.py --source=samples/appengine --dest=snapshot/samples/appengine
Joe Gregorio17afeb12011-12-15 09:42:12 -050057 python expand-symlinks.py --source=samples/django_sample --dest=snapshot/django_sample
Joe Gregorioc47fab72011-07-06 08:29:20 -040058 cp setup_oauth2client.py snapshot/setup.py
Joe Gregorioc47fab72011-07-06 08:29:20 -040059 cp MANIFEST_oauth2client.in snapshot/MANIFEST.in
60 cp README_oauth2client snapshot/README
61 cd snapshot; python setup.py clean
62 cd snapshot; python setup.py sdist --formats=gztar,zip
63
64.PHONY: oauth2_release
65oauth2_release: oauth2_prerelease
66 @echo "This target will upload a new release to PyPi and code.google.com hosting."
67 @echo "Are you sure you want to proceed? (yes/no)"
Joe Gregorioece1da32012-03-02 13:33:09 -080068 @read yn; if [ yes -ne $(yn) ]; then exit 1; fi
Joe Gregorioc47fab72011-07-06 08:29:20 -040069 @echo "Here we go..."
70 cd snapshot; python setup.py sdist --formats=gztar,zip register upload
71 wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py
Joe Gregorio1daa71b2011-09-15 18:12:14 -040072 python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz
73 python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.zip