Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 1 | # Copyright (C) 2010 Google Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 14 | |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 15 | """Setup script for Google API Python client. |
| 16 | |
| 17 | Also installs included versions of third party libraries, if those libraries |
| 18 | are not already installed. |
| 19 | """ |
Joe Gregorio | 336b978 | 2011-09-15 14:35:54 -0400 | [diff] [blame] | 20 | from setuptools import setup |
Joe Gregorio | 01b9270 | 2011-03-23 21:44:42 -0400 | [diff] [blame] | 21 | |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 22 | packages = [ |
| 23 | 'apiclient', |
| 24 | 'oauth2client', |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 25 | ] |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 26 | |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 27 | install_requires = [ |
Joe Gregorio | 3cc9a45 | 2013-03-07 10:08:39 -0500 | [diff] [blame] | 28 | 'httplib2>=0.8', |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 29 | ] |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 30 | |
Joe Gregorio | 14eb973 | 2013-03-13 09:27:53 -0400 | [diff] [blame] | 31 | needs_json = False |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 32 | try: |
| 33 | import json |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 34 | except ImportError: |
Joe Gregorio | 921b8e4 | 2012-06-15 15:51:51 -0400 | [diff] [blame] | 35 | try: |
| 36 | import simplejson |
Joe Gregorio | 921b8e4 | 2012-06-15 15:51:51 -0400 | [diff] [blame] | 37 | except ImportError: |
| 38 | needs_json = True |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 39 | |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 40 | if needs_json: |
| 41 | install_requires.append('simplejson') |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 42 | |
Joe Gregorio | 3ad5e9a | 2010-12-09 15:01:04 -0500 | [diff] [blame] | 43 | long_desc = """The Google API Client for Python is a client library for |
Joe Gregorio | c4fc095 | 2011-11-09 12:21:11 -0500 | [diff] [blame] | 44 | accessing the Plus, Moderator, and many other Google APIs.""" |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 45 | |
Joe Gregorio | 696583c | 2012-03-21 15:20:51 -0400 | [diff] [blame] | 46 | import apiclient |
| 47 | version = apiclient.__version__ |
| 48 | |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 49 | setup(name="google-api-python-client", |
Joe Gregorio | 696583c | 2012-03-21 15:20:51 -0400 | [diff] [blame] | 50 | version=version, |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 51 | description="Google API Client Library for Python", |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 52 | long_description=long_desc, |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 53 | author="Joe Gregorio", |
| 54 | author_email="jcgregorio@google.com", |
| 55 | url="http://code.google.com/p/google-api-python-client/", |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 56 | install_requires=install_requires, |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 57 | packages=packages, |
Joe Gregorio | 79daca0 | 2013-03-29 16:25:52 -0400 | [diff] [blame^] | 58 | package_data={}, |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 59 | license="Apache 2.0", |
| 60 | keywords="google api client", |
Joe Gregorio | 34af298 | 2013-03-07 10:50:38 -0500 | [diff] [blame] | 61 | classifiers=['Development Status :: 5 - Production/Stable', |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 62 | 'Intended Audience :: Developers', |
| 63 | 'License :: OSI Approved :: Apache Software License', |
| 64 | 'Operating System :: POSIX', |
| 65 | 'Topic :: Internet :: WWW/HTTP']) |