blob: b02348bbd1ebc62388d33783c4bdea366fea0422 [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"""
Joe Gregorio336b9782011-09-15 14:35:54 -040020from setuptools import setup
Joe Gregoriod92897c2011-07-07 11:44:56 -040021
22packages = [
23 'oauth2client',
24]
25
Joe Gregoriod667c9d2011-10-17 13:25:24 -040026install_requires = [
Joe Gregorioff828af2012-11-16 15:45:52 -050027 'httplib2>=0.7.7',
Joe Gregoriod667c9d2011-10-17 13:25:24 -040028 'python-gflags',
29 ]
Joe Gregoriod92897c2011-07-07 11:44:56 -040030
Joe Gregorio921b8e42012-06-15 15:51:51 -040031needs_json = True
Joe Gregoriod667c9d2011-10-17 13:25:24 -040032try:
33 import json
34 needs_json = False
Joe Gregorio1a4a2d32011-11-03 10:44:44 -040035except ImportError:
Joe Gregorio921b8e42012-06-15 15:51:51 -040036 try:
37 import simplejson
38 needs_json = False
39 except ImportError:
40 needs_json = True
Joe Gregoriod92897c2011-07-07 11:44:56 -040041
Joe Gregoriod667c9d2011-10-17 13:25:24 -040042if needs_json:
43 install_requires.append('simplejson')
Joe Gregoriod92897c2011-07-07 11:44:56 -040044
45long_desc = """The oauth2client is a client library for OAuth 2.0."""
46
Joe Gregorio696583c2012-03-21 15:20:51 -040047import oauth2client
48version = oauth2client.__version__
49
Joe Gregoriod92897c2011-07-07 11:44:56 -040050setup(name="oauth2client",
Joe Gregorio696583c2012-03-21 15:20:51 -040051 version=version,
Joe Gregoriod92897c2011-07-07 11:44:56 -040052 description="OAuth 2.0 client library",
53 long_description=long_desc,
54 author="Joe Gregorio",
55 author_email="jcgregorio@google.com",
56 url="http://code.google.com/p/google-api-python-client/",
57 install_requires=install_requires,
58 packages=packages,
Joe Gregoriod92897c2011-07-07 11:44:56 -040059 license="Apache 2.0",
60 keywords="google oauth 2.0 http client",
61 classifiers=['Development Status :: 4 - Beta',
62 'Intended Audience :: Developers',
63 'License :: OSI Approved :: Apache Software License',
64 'Operating System :: POSIX',
65 'Topic :: Internet :: WWW/HTTP'])