blob: 4908cb8077fe37da6cc7ea5c9907e7710dd494b0 [file] [log] [blame]
Tom Miller7c95d812010-10-11 11:50:52 -07001# 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 Gregorio48d361f2010-08-18 13:19:21 -040014
Tom Miller7c95d812010-10-11 11:50:52 -070015"""Setup script for Google API Python client.
16
17Also installs included versions of third party libraries, if those libraries
18are not already installed.
19"""
Tom Miller7c95d812010-10-11 11:50:52 -070020import setup_utils
21
Joe Gregorio336b9782011-09-15 14:35:54 -040022from setuptools import setup
Joe Gregorio01b92702011-03-23 21:44:42 -040023
Joe Gregorio6429bf62011-03-01 22:53:21 -080024packages = [
25 'apiclient',
26 'oauth2client',
27 'apiclient.ext',
28 'apiclient.contrib',
29 'apiclient.contrib.buzz',
30 'apiclient.contrib.latitude',
31 'apiclient.contrib.moderator',
Joe Gregorio4258d6b2011-03-18 10:20:16 -040032 'uritemplate',
Joe Gregorio6429bf62011-03-01 22:53:21 -080033]
Joe Gregorio5cdaa512011-03-28 16:41:55 -040034
35install_requires = []
Joe Gregorio01b92702011-03-23 21:44:42 -040036py_modules = []
Joe Gregorio6429bf62011-03-01 22:53:21 -080037
Tom Miller7c95d812010-10-11 11:50:52 -070038
Joe Gregorio5cdaa512011-03-28 16:41:55 -040039# (module to test for, install_requires to add if missing, packages to add if missing, py_modules to add if missing)
40REQUIREMENTS = [
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 Miller7c95d812010-10-11 11:50:52 -070046
Joe Gregorio5cdaa512011-03-28 16:41:55 -040047for import_name, requires, package, modules in REQUIREMENTS:
48 if setup_utils.is_missing(import_name):
Joe Gregorio336b9782011-09-15 14:35:54 -040049 install_requires.append(requires)
Joe Gregorio5cdaa512011-03-28 16:41:55 -040050
Tom Miller7c95d812010-10-11 11:50:52 -070051
Joe Gregorio3ad5e9a2010-12-09 15:01:04 -050052long_desc = """The Google API Client for Python is a client library for
Tom Miller7c95d812010-10-11 11:50:52 -070053accessing the Buzz, Moderator, and Latitude APIs."""
54
Joe Gregorio48d361f2010-08-18 13:19:21 -040055setup(name="google-api-python-client",
Joe Gregorioa8451672011-09-15 09:53:21 -040056 version="1.0beta3",
Joe Gregorio48d361f2010-08-18 13:19:21 -040057 description="Google API Client Library for Python",
Tom Miller7c95d812010-10-11 11:50:52 -070058 long_description=long_desc,
Joe Gregorio48d361f2010-08-18 13:19:21 -040059 author="Joe Gregorio",
60 author_email="jcgregorio@google.com",
61 url="http://code.google.com/p/google-api-python-client/",
Joe Gregorio5cdaa512011-03-28 16:41:55 -040062 install_requires=install_requires,
Tom Miller7c95d812010-10-11 11:50:52 -070063 packages=packages,
Joe Gregorio01b92702011-03-23 21:44:42 -040064 py_modules=py_modules,
Joe Gregorio6429bf62011-03-01 22:53:21 -080065 package_data={
66 'apiclient': ['contrib/*/*.json']
67 },
Joe Gregoriobce596b2011-04-05 00:45:40 -040068 scripts=['bin/enable-app-engine-project'],
Tom Miller7c95d812010-10-11 11:50:52 -070069 license="Apache 2.0",
70 keywords="google api client",
Joe Gregorioc47fab72011-07-06 08:29:20 -040071 classifiers=['Development Status :: 4 - Beta',
Tom Miller7c95d812010-10-11 11:50:52 -070072 'Intended Audience :: Developers',
73 'License :: OSI Approved :: Apache Software License',
74 'Operating System :: POSIX',
75 'Topic :: Internet :: WWW/HTTP'])