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 'mock>=1.0.1', 43] 44 45CONSOLE_SCRIPTS = [ 46 'gen_client = apitools.gen.gen_client:main', 47] 48 49py_version = platform.python_version() 50 51_APITOOLS_VERSION = '0.5.31' 52 53with open('README.rst') as fileobj: 54 README = fileobj.read() 55 56setuptools.setup( 57 name='google-apitools', 58 version=_APITOOLS_VERSION, 59 description='client libraries for humans', 60 long_description=README, 61 url='http://github.com/google/apitools', 62 author='Craig Citro', 63 author_email='craigcitro@google.com', 64 python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', 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 'Programming Language :: Python :: 2', 92 'Programming Language :: Python :: 2.7', 93 'Programming Language :: Python :: 3', 94 'Programming Language :: Python :: 3.5', 95 'Topic :: Software Development :: Libraries', 96 'Topic :: Software Development :: Libraries :: Python Modules', 97 ], 98 license='Apache 2.0', 99 keywords='apitools', 100 ) 101