blob: efd111789239c67e9e0142830d693888809c3123 [file] [log] [blame]
Craig Citroc12bd642013-10-21 01:10:35 -07001#!/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
Tres Seaverb07a5a12014-10-06 23:10:05 -040021try:
22 import setuptools
23except ImportError:
24 from ez_setup import use_setuptools
25 use_setuptools()
26 import setuptools
Craig Citroc12bd642013-10-21 01:10:35 -070027
28# Configure the required packages and scripts to install, depending on
29# Python version and OS.
30REQUIRED_PACKAGES = [
Craig Citro5674c272014-11-06 15:24:31 -080031 'httplib2>=0.8',
Evan Parker63e97c12017-11-16 10:53:47 -080032 'fasteners>=0.14',
33 'oauth2client>=1.4.12',
Lee Ballf704b622019-03-18 15:52:32 -070034 'six>=1.12.0',
Tres Seaverb07a5a12014-10-06 23:10:05 -040035 ]
36
Tres Seaverd15f4c72014-10-08 12:28:58 -040037CLI_PACKAGES = [
Craig Citroed6f2792018-03-28 22:28:18 -070038 'python-gflags>=3.0.6',
Tres Seaverd15f4c72014-10-08 12:28:58 -040039]
40
41TESTING_PACKAGES = [
Craig Citro5674c272014-11-06 15:24:31 -080042 'mock>=1.0.1',
Tres Seaverd15f4c72014-10-08 12:28:58 -040043]
44
Craig Citro903c5d42013-10-23 11:01:29 -070045CONSOLE_SCRIPTS = [
Arthur D. Cherbaa2117ba2015-09-10 13:28:11 -040046 'gen_client = apitools.gen.gen_client:main',
Craig Citro7bdd56e2015-06-02 17:17:36 -070047]
Craig Citroc12bd642013-10-21 01:10:35 -070048
49py_version = platform.python_version()
50
Matt Houglum0645e5a2019-06-26 16:02:00 -070051_APITOOLS_VERSION = '0.5.30'
Craig Citroc12bd642013-10-21 01:10:35 -070052
Tres Seaver623d5d22014-11-20 11:23:03 -050053with open('README.rst') as fileobj:
54 README = fileobj.read()
55
Craig Citroc12bd642013-10-21 01:10:35 -070056setuptools.setup(
Tres Seaver08a927c2014-11-20 10:43:05 -050057 name='google-apitools',
Craig Citroc12bd642013-10-21 01:10:35 -070058 version=_APITOOLS_VERSION,
59 description='client libraries for humans',
Tres Seaver623d5d22014-11-20 11:23:03 -050060 long_description=README,
kevinli78d187a82017-12-21 13:48:23 -050061 url='http://github.com/google/apitools',
Craig Citroc12bd642013-10-21 01:10:35 -070062 author='Craig Citro',
63 author_email='craigcitro@google.com',
Hugo van Kemenade0db6e8f2020-04-10 02:18:29 +030064 python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
Craig Citroc12bd642013-10-21 01:10:35 -070065 # Contained modules and scripts.
Mike Frysingera65ff692018-03-29 03:33:25 -040066 packages=setuptools.find_packages(include=['apitools']),
Craig Citrob5151712016-02-14 23:23:43 -080067 entry_points={'console_scripts': CONSOLE_SCRIPTS},
Craig Citroc12bd642013-10-21 01:10:35 -070068 install_requires=REQUIRED_PACKAGES,
Tres Seaver3f015e92014-10-08 14:49:06 -040069 tests_require=REQUIRED_PACKAGES + CLI_PACKAGES + TESTING_PACKAGES,
Craig Citroc5825cc2014-11-06 14:55:51 -080070 extras_require={
Tres Seaverd15f4c72014-10-08 12:28:58 -040071 'cli': CLI_PACKAGES,
72 'testing': TESTING_PACKAGES,
Tres Seaverb07a5a12014-10-06 23:10:05 -040073 },
Craig Citro7bdd56e2015-06-02 17:17:36 -070074 # Add in any packaged data.
75 include_package_data=True,
76 package_data={
77 'apitools.data': ['*'],
78 },
Mike Frysingera65ff692018-03-29 03:33:25 -040079 exclude_package_data={
80 '': [
81 '*_test.py',
82 '*/testing/*',
83 '*/testdata/*',
84 'base/protorpclite/test_util.py',
85 'gen/test_utils.py',
86 ],
87 },
Craig Citroc12bd642013-10-21 01:10:35 -070088 # PyPI package information.
89 classifiers=[
90 'License :: OSI Approved :: Apache Software License',
Hugo van Kemenade0db6e8f2020-04-10 02:18:29 +030091 'Programming Language :: Python :: 2',
92 'Programming Language :: Python :: 2.7',
93 'Programming Language :: Python :: 3',
94 'Programming Language :: Python :: 3.5',
Craig Citroc12bd642013-10-21 01:10:35 -070095 'Topic :: Software Development :: Libraries',
96 'Topic :: Software Development :: Libraries :: Python Modules',
97 ],
98 license='Apache 2.0',
99 keywords='apitools',
100 )