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 | """ |
| 20 | import setup_utils |
| 21 | |
Joe Gregorio | 336b978 | 2011-09-15 14:35:54 -0400 | [diff] [blame^] | 22 | from setuptools import setup |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 23 | |
| 24 | packages = [ |
| 25 | 'oauth2client', |
| 26 | ] |
| 27 | |
| 28 | install_requires = [] |
| 29 | py_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) |
| 33 | REQUIREMENTS = [ |
| 34 | ('httplib2', 'httplib2', 'httplib2', None), |
| 35 | ('gflags', 'python-gflags', None, ['gflags', 'gflags_validators']), |
| 36 | (['json', 'simplejson', 'django.utils'], 'simplejson', 'simplejson', None) |
| 37 | ] |
| 38 | |
| 39 | for import_name, requires, package, modules in REQUIREMENTS: |
| 40 | if setup_utils.is_missing(import_name): |
Joe Gregorio | 336b978 | 2011-09-15 14:35:54 -0400 | [diff] [blame^] | 41 | install_requires.append(requires) |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 42 | |
| 43 | |
| 44 | long_desc = """The oauth2client is a client library for OAuth 2.0.""" |
| 45 | |
| 46 | setup(name="oauth2client", |
Joe Gregorio | a845167 | 2011-09-15 09:53:21 -0400 | [diff] [blame] | 47 | version="1.0beta3", |
Joe Gregorio | d92897c | 2011-07-07 11:44:56 -0400 | [diff] [blame] | 48 | 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']) |