blob: ab5bed2f1c3cda407ef46c99fe0802da0a85dd0e [file] [log] [blame]
Joe Gregoriod92897c2011-07-07 11:44:56 -04001# 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.
14
15"""Setup script for oauth2client.
16
17Also installs included versions of third party libraries, if those libraries
18are not already installed.
19"""
20import setup_utils
21
Joe Gregorio336b9782011-09-15 14:35:54 -040022from setuptools import setup
Joe Gregoriod92897c2011-07-07 11:44:56 -040023
24packages = [
25 'oauth2client',
26]
27
28install_requires = []
29py_modules = []
30
31
32# (module to test for, install_requires to add if missing, packages to add if missing, py_modules to add if missing)
33REQUIREMENTS = [
34 ('httplib2', 'httplib2', 'httplib2', None),
35 ('gflags', 'python-gflags', None, ['gflags', 'gflags_validators']),
36 (['json', 'simplejson', 'django.utils'], 'simplejson', 'simplejson', None)
37]
38
39for import_name, requires, package, modules in REQUIREMENTS:
40 if setup_utils.is_missing(import_name):
Joe Gregorio336b9782011-09-15 14:35:54 -040041 install_requires.append(requires)
Joe Gregoriod92897c2011-07-07 11:44:56 -040042
43
44long_desc = """The oauth2client is a client library for OAuth 2.0."""
45
46setup(name="oauth2client",
Joe Gregorioa8451672011-09-15 09:53:21 -040047 version="1.0beta3",
Joe Gregoriod92897c2011-07-07 11:44:56 -040048 description="OAuth 2.0 client library",
49 long_description=long_desc,
50 author="Joe Gregorio",
51 author_email="jcgregorio@google.com",
52 url="http://code.google.com/p/google-api-python-client/",
53 install_requires=install_requires,
54 packages=packages,
55 py_modules=py_modules,
56 license="Apache 2.0",
57 keywords="google oauth 2.0 http client",
58 classifiers=['Development Status :: 4 - Beta',
59 'Intended Audience :: Developers',
60 'License :: OSI Approved :: Apache Software License',
61 'Operating System :: POSIX',
62 'Topic :: Internet :: WWW/HTTP'])