Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [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. |
| 14 | |
| 15 | """Setup script for oauth2client. |
| 16 | |
| 17 | Also installs included versions of third party libraries, if those libraries |
| 18 | are not already installed. |
| 19 | """ |
Joe Gregorio | 336b978 | 2011-09-15 14:35:54 -0400 | [diff] [blame] | 20 | from setuptools import setup |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 21 | |
| 22 | packages = [ |
| 23 | 'oauth2client', |
| 24 | ] |
| 25 | |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 26 | install_requires = [ |
Joe Gregorio | c2928a4 | 2012-02-23 13:43:59 -0500 | [diff] [blame^] | 27 | 'httplib2>=0.7.2', |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 28 | 'python-gflags', |
| 29 | ] |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 30 | |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 31 | try: |
| 32 | import json |
| 33 | needs_json = False |
Joe Gregorio | 1a4a2d3 | 2011-11-03 10:44:44 -0400 | [diff] [blame] | 34 | except ImportError: |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 35 | needs_json = True |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 36 | |
Joe Gregorio | d667c9d | 2011-10-17 13:25:24 -0400 | [diff] [blame] | 37 | if needs_json: |
| 38 | install_requires.append('simplejson') |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 39 | |
| 40 | long_desc = """The oauth2client is a client library for OAuth 2.0.""" |
| 41 | |
| 42 | setup(name="oauth2client", |
Joe Gregorio | 2401bd6 | 2011-12-15 09:18:49 -0500 | [diff] [blame] | 43 | version="1.0beta7", |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 44 | description="OAuth 2.0 client library", |
| 45 | long_description=long_desc, |
| 46 | author="Joe Gregorio", |
| 47 | author_email="jcgregorio@google.com", |
| 48 | url="http://code.google.com/p/google-api-python-client/", |
| 49 | install_requires=install_requires, |
| 50 | packages=packages, |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 51 | license="Apache 2.0", |
| 52 | keywords="google oauth 2.0 http client", |
| 53 | classifiers=['Development Status :: 4 - Beta', |
| 54 | 'Intended Audience :: Developers', |
| 55 | 'License :: OSI Approved :: Apache Software License', |
| 56 | 'Operating System :: POSIX', |
| 57 | 'Topic :: Internet :: WWW/HTTP']) |