blob: e67377d9ee1e934d5b01778b8bb18b229b8b40f4 [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',
Joe Gregorio14eb9732013-03-13 09:27:53 -040024 'uritemplate',
Joe Gregoriod92897c2011-07-07 11:44:56 -040025]
26
Joe Gregoriod667c9d2011-10-17 13:25:24 -040027install_requires = [
Joe Gregorio3cc9a452013-03-07 10:08:39 -050028 'httplib2>=0.8',
Joe Gregoriod667c9d2011-10-17 13:25:24 -040029 'python-gflags',
30 ]
Joe Gregoriod92897c2011-07-07 11:44:56 -040031
Joe Gregorio14eb9732013-03-13 09:27:53 -040032needs_json = False
Joe Gregoriod667c9d2011-10-17 13:25:24 -040033try:
34 import json
Joe Gregorio1a4a2d32011-11-03 10:44:44 -040035except ImportError:
Joe Gregorio921b8e42012-06-15 15:51:51 -040036 try:
37 import simplejson
Joe Gregorio921b8e42012-06-15 15:51:51 -040038 except ImportError:
39 needs_json = True
Joe Gregoriod92897c2011-07-07 11:44:56 -040040
Joe Gregoriod667c9d2011-10-17 13:25:24 -040041if needs_json:
42 install_requires.append('simplejson')
Joe Gregoriod92897c2011-07-07 11:44:56 -040043
44long_desc = """The oauth2client is a client library for OAuth 2.0."""
45
Joe Gregorio696583c2012-03-21 15:20:51 -040046import oauth2client
47version = oauth2client.__version__
48
Joe Gregoriod92897c2011-07-07 11:44:56 -040049setup(name="oauth2client",
Joe Gregorio696583c2012-03-21 15:20:51 -040050 version=version,
Joe Gregoriod92897c2011-07-07 11:44:56 -040051 description="OAuth 2.0 client library",
52 long_description=long_desc,
53 author="Joe Gregorio",
54 author_email="jcgregorio@google.com",
55 url="http://code.google.com/p/google-api-python-client/",
56 install_requires=install_requires,
57 packages=packages,
Joe Gregoriod92897c2011-07-07 11:44:56 -040058 license="Apache 2.0",
59 keywords="google oauth 2.0 http client",
Joe Gregorio34af2982013-03-07 10:50:38 -050060 classifiers=['Development Status :: 5 - Production/Stable',
Joe Gregoriod92897c2011-07-07 11:44:56 -040061 'Intended Audience :: Developers',
62 'License :: OSI Approved :: Apache Software License',
63 'Operating System :: POSIX',
64 'Topic :: Internet :: WWW/HTTP'])