blob: 8d6962b740fe4b43d0679b2e7004e012215d1bdf [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 Gregorio6429bf62011-03-01 22:53:21 -080022
23.PHONY: prerelease
24prerelease:
Joe Gregorio696583c2012-03-21 15:20:51 -040025 ./runtests.sh python2.6
26 ./runtests.sh python2.7
Joe Gregoriob17c7632011-04-05 01:31:55 -040027 -sudo rm -rf dist/
28 -sudo rm -rf snapshot/
29 python expand-symlinks.py
30 cd snapshot; python setup.py clean
31 cd snapshot; python setup.py sdist --formats=gztar,zip
Joe Gregorio6429bf62011-03-01 22:53:21 -080032
33.PHONY: release
34release: prerelease
Joe Gregorio93841702011-03-02 16:12:05 -080035 @echo "This target will upload a new release to PyPi and code.google.com hosting."
36 @echo "Are you sure you want to proceed? (yes/no)"
Joe Gregorioece1da32012-03-02 13:33:09 -080037 @read yn; if [ yes -ne $(yn) ]; then exit 1; fi
Joe Gregorio93841702011-03-02 16:12:05 -080038 @echo "Here we go..."
Joe Gregoriob17c7632011-04-05 01:31:55 -040039 cd snapshot; python setup.py sdist --formats=gztar,zip register upload
Joe Gregorio6429bf62011-03-01 22:53:21 -080040 wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py
Joe Gregorio1daa71b2011-09-15 18:12:14 -040041 python googlecode_upload.py --summary="google-api-python-client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz
42 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 -040043
44
45.PHONY: oauth2_prerelease
46oauth2_prerelease:
47 -sudo rm -rf dist/
48 -sudo rm -rf snapshot/
49 mkdir snapshot
50 python expand-symlinks.py --source=oauth2client --dest=snapshot/oauth2client
Joe Gregorio17afeb12011-12-15 09:42:12 -050051 python expand-symlinks.py --source=samples/dailymotion --dest=snapshot/samples/dailymotion
Joe Gregorioc47fab72011-07-06 08:29:20 -040052 python expand-symlinks.py --source=samples/appengine --dest=snapshot/samples/appengine
Joe Gregorio17afeb12011-12-15 09:42:12 -050053 python expand-symlinks.py --source=samples/django_sample --dest=snapshot/django_sample
Joe Gregorioc47fab72011-07-06 08:29:20 -040054 cp setup_oauth2client.py snapshot/setup.py
Joe Gregorioc47fab72011-07-06 08:29:20 -040055 cp MANIFEST_oauth2client.in snapshot/MANIFEST.in
56 cp README_oauth2client snapshot/README
57 cd snapshot; python setup.py clean
58 cd snapshot; python setup.py sdist --formats=gztar,zip
59
60.PHONY: oauth2_release
61oauth2_release: oauth2_prerelease
62 @echo "This target will upload a new release to PyPi and code.google.com hosting."
63 @echo "Are you sure you want to proceed? (yes/no)"
Joe Gregorioece1da32012-03-02 13:33:09 -080064 @read yn; if [ yes -ne $(yn) ]; then exit 1; fi
Joe Gregorioc47fab72011-07-06 08:29:20 -040065 @echo "Here we go..."
66 cd snapshot; python setup.py sdist --formats=gztar,zip register upload
67 wget "http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" -O googlecode_upload.py
Joe Gregorio1daa71b2011-09-15 18:12:14 -040068 python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.tar.gz
69 python googlecode_upload.py --summary="oauth2client Version $(shell python setup.py --version)" --project=google-api-python-client snapshot/dist/*.zip