1# Copyright 2017 The Abseil Authors. 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"""Abseil setup configuration.""" 16 17import os 18import sys 19 20try: 21 import setuptools 22except ImportError: 23 from ez_setup import use_setuptools 24 use_setuptools() 25 import setuptools 26 27if sys.version_info < (3, 6): 28 raise RuntimeError('Python version 3.6+ is required.') 29 30setuptools_version = tuple( 31 int(x) for x in setuptools.__version__.split('.')[:2]) 32 33additional_kwargs = {} 34if setuptools_version >= (24, 2): 35 # `python_requires` was added in 24.2, see 36 # https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires 37 additional_kwargs['python_requires'] = '>=3.6' 38 39_README_PATH = os.path.join( 40 os.path.dirname(os.path.realpath(__file__)), 'README.md') 41with open(_README_PATH, 'rb') as fp: 42 LONG_DESCRIPTION = fp.read().decode('utf-8') 43 44setuptools.setup( 45 name='absl-py', 46 version='1.3.0', 47 description=( 48 'Abseil Python Common Libraries, ' 49 'see https://github.com/abseil/abseil-py.'), 50 long_description=LONG_DESCRIPTION, 51 long_description_content_type='text/markdown', 52 author='The Abseil Authors', 53 url='https://github.com/abseil/abseil-py', 54 packages=setuptools.find_packages(exclude=[ 55 '*.tests', '*.tests.*', 'tests.*', 'tests', 56 ]), 57 include_package_data=True, 58 license='Apache 2.0', 59 classifiers=[ 60 'Programming Language :: Python', 61 'Programming Language :: Python :: 3', 62 'Programming Language :: Python :: 3.6', 63 'Programming Language :: Python :: 3.7', 64 'Programming Language :: Python :: 3.8', 65 'Programming Language :: Python :: 3.9', 66 'Programming Language :: Python :: 3.10', 67 'Programming Language :: Python :: 3.11', 68 'Intended Audience :: Developers', 69 'Topic :: Software Development :: Libraries :: Python Modules', 70 'License :: OSI Approved :: Apache Software License', 71 'Operating System :: OS Independent', 72 ], 73 **additional_kwargs, 74) 75