1#!/usr/bin/env python 2# 3# Copyright 2013 Google Inc. All Rights Reserved. 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17"""Setup configuration.""" 18 19import platform 20 21try: 22 import setuptools 23except ImportError: 24 from ez_setup import use_setuptools 25 use_setuptools() 26 import setuptools 27 28# Configure the required packages and scripts to install, depending on 29# Python version and OS. 30REQUIRED_PACKAGES = [ 31 'httplib2>=0.8', 32 'fasteners>=0.14', 33 'oauth2client>=1.4.12', 34 'six>=1.12.0', 35 ] 36 37CLI_PACKAGES = [ 38 'python-gflags>=3.0.6', 39] 40 41TESTING_PACKAGES = [ 42 'unittest2>=0.5.1', 43 'mock>=1.0.1', 44] 45 46CONSOLE_SCRIPTS = [ 47 'gen_client = apitools.gen.gen_client:main', 48] 49 50py_version = platform.python_version() 51 52_APITOOLS_VERSION = '0.5.30' 53 54with open('README.rst') as fileobj: 55 README = fileobj.read() 56 57setuptools.setup( 58 name='google-apitools', 59 version=_APITOOLS_VERSION, 60 description='client libraries for humans', 61 long_description=README, 62 url='http://github.com/google/apitools', 63 author='Craig Citro', 64 author_email='craigcitro@google.com', 65 # Contained modules and scripts. 66 packages=setuptools.find_packages(include=['apitools']), 67 entry_points={'console_scripts': CONSOLE_SCRIPTS}, 68 install_requires=REQUIRED_PACKAGES, 69 tests_require=REQUIRED_PACKAGES + CLI_PACKAGES + TESTING_PACKAGES, 70 extras_require={ 71 'cli': CLI_PACKAGES, 72 'testing': TESTING_PACKAGES, 73 }, 74 # Add in any packaged data. 75 include_package_data=True, 76 package_data={ 77 'apitools.data': ['*'], 78 }, 79 exclude_package_data={ 80 '': [ 81 '*_test.py', 82 '*/testing/*', 83 '*/testdata/*', 84 'base/protorpclite/test_util.py', 85 'gen/test_utils.py', 86 ], 87 }, 88 # PyPI package information. 89 classifiers=[ 90 'License :: OSI Approved :: Apache Software License', 91 'Topic :: Software Development :: Libraries', 92 'Topic :: Software Development :: Libraries :: Python Modules', 93 ], 94 license='Apache 2.0', 95 keywords='apitools', 96 ) 97