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 | """ |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 20 | import setup_utils |
| 21 | |
Joe Gregorio | 336b978 | 2011-09-15 14:35:54 -0400 | [diff] [blame^] | 22 | from setuptools import setup |
Joe Gregorio | 01b9270 | 2011-03-23 21:44:42 -0400 | [diff] [blame] | 23 | |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 24 | packages = [ |
| 25 | 'apiclient', |
| 26 | 'oauth2client', |
| 27 | 'apiclient.ext', |
| 28 | 'apiclient.contrib', |
| 29 | 'apiclient.contrib.buzz', |
| 30 | 'apiclient.contrib.latitude', |
| 31 | 'apiclient.contrib.moderator', |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 32 | 'uritemplate', |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 33 | ] |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 34 | |
| 35 | install_requires = [] |
Joe Gregorio | 01b9270 | 2011-03-23 21:44:42 -0400 | [diff] [blame] | 36 | py_modules = [] |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 37 | |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 38 | |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 39 | # (module to test for, install_requires to add if missing, packages to add if missing, py_modules to add if missing) |
| 40 | REQUIREMENTS = [ |
| 41 | ('httplib2', 'httplib2', 'httplib2', None), |
| 42 | ('oauth2', 'oauth2', 'oauth2', None), |
| 43 | ('gflags', 'python-gflags', None, ['gflags', 'gflags_validators']), |
| 44 | (['json', 'simplejson', 'django.utils'], 'simplejson', 'simplejson', None) |
| 45 | ] |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 46 | |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 47 | for import_name, requires, package, modules in REQUIREMENTS: |
| 48 | if setup_utils.is_missing(import_name): |
Joe Gregorio | 336b978 | 2011-09-15 14:35:54 -0400 | [diff] [blame^] | 49 | install_requires.append(requires) |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 50 | |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 51 | |
Joe Gregorio | 3ad5e9a | 2010-12-09 15:01:04 -0500 | [diff] [blame] | 52 | long_desc = """The Google API Client for Python is a client library for |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 53 | accessing the Buzz, Moderator, and Latitude APIs.""" |
| 54 | |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 55 | setup(name="google-api-python-client", |
Joe Gregorio | a845167 | 2011-09-15 09:53:21 -0400 | [diff] [blame] | 56 | version="1.0beta3", |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 57 | description="Google API Client Library for Python", |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 58 | long_description=long_desc, |
Joe Gregorio | 48d361f | 2010-08-18 13:19:21 -0400 | [diff] [blame] | 59 | author="Joe Gregorio", |
| 60 | author_email="jcgregorio@google.com", |
| 61 | url="http://code.google.com/p/google-api-python-client/", |
Joe Gregorio | 5cdaa51 | 2011-03-28 16:41:55 -0400 | [diff] [blame] | 62 | install_requires=install_requires, |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 63 | packages=packages, |
Joe Gregorio | 01b9270 | 2011-03-23 21:44:42 -0400 | [diff] [blame] | 64 | py_modules=py_modules, |
Joe Gregorio | 6429bf6 | 2011-03-01 22:53:21 -0800 | [diff] [blame] | 65 | package_data={ |
| 66 | 'apiclient': ['contrib/*/*.json'] |
| 67 | }, |
Joe Gregorio | bce596b | 2011-04-05 00:45:40 -0400 | [diff] [blame] | 68 | scripts=['bin/enable-app-engine-project'], |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 69 | license="Apache 2.0", |
| 70 | keywords="google api client", |
Joe Gregorio | c47fab7 | 2011-07-06 08:29:20 -0400 | [diff] [blame] | 71 | classifiers=['Development Status :: 4 - Beta', |
Tom Miller | 7c95d81 | 2010-10-11 11:50:52 -0700 | [diff] [blame] | 72 | 'Intended Audience :: Developers', |
| 73 | 'License :: OSI Approved :: Apache Software License', |
| 74 | 'Operating System :: POSIX', |
| 75 | 'Topic :: Internet :: WWW/HTTP']) |