abseil-py
/
setup.py
82 строки · 2.6 Кб
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 os18import sys19
20# pylint: disable=g-import-not-at-top
21try:22import setuptools23except ImportError:24from ez_setup import use_setuptools25use_setuptools()26import setuptools27# pylint: enable=g-import-not-at-top
28
29if sys.version_info < (3, 7):30raise RuntimeError('Python version 3.7+ is required.')31
32setuptools_version = tuple(33int(x) for x in setuptools.__version__.split('.')[:2])34
35additional_kwargs = {}36if setuptools_version >= (24, 2):37# `python_requires` was added in 24.2, see38# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires39additional_kwargs['python_requires'] = '>=3.7'40
41_README_PATH = os.path.join(42os.path.dirname(os.path.realpath(__file__)), 'README.md')43with open(_README_PATH, 'rb') as fp:44LONG_DESCRIPTION = fp.read().decode('utf-8')45
46setuptools.setup(47name='absl-py',48version='2.1.0',49description=(50'Abseil Python Common Libraries, '51'see https://github.com/abseil/abseil-py.'52),53long_description=LONG_DESCRIPTION,54long_description_content_type='text/markdown',55author='The Abseil Authors',56url='https://github.com/abseil/abseil-py',57packages=setuptools.find_packages(58exclude=[59'*.tests',60'*.tests.*',61'tests.*',62'tests',63]64),65include_package_data=True,66license='Apache 2.0',67classifiers=[68'Programming Language :: Python',69'Programming Language :: Python :: 3',70'Programming Language :: Python :: 3.7',71'Programming Language :: Python :: 3.8',72'Programming Language :: Python :: 3.9',73'Programming Language :: Python :: 3.10',74'Programming Language :: Python :: 3.11',75'Programming Language :: Python :: 3.12',76'Intended Audience :: Developers',77'Topic :: Software Development :: Libraries :: Python Modules',78'License :: OSI Approved :: Apache Software License',79'Operating System :: OS Independent',80],81**additional_kwargs,82)
83