1#! /usr/bin/env python3
2# Copyright 2021 The gRPC Authors
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15"""A PyPI package for xDS protos generated Python code."""
16
17import os
18
19import setuptools
20
21WORK_DIR = os.path.dirname(os.path.abspath(__file__))
22EXCLUDE_PYTHON_FILES = ['generated_file_import_test.py', 'build.py']
23
24# Use setuptools to build Python package
25with open(os.path.join(WORK_DIR, 'README.rst'), 'r') as f:
26    LONG_DESCRIPTION = f.read()
27PACKAGES = setuptools.find_packages(where=".", exclude=EXCLUDE_PYTHON_FILES)
28CLASSIFIERS = [
29    'Development Status :: 3 - Alpha',
30    'Programming Language :: Python',
31    'Programming Language :: Python :: 3',
32    'License :: OSI Approved :: Apache Software License',
33]
34INSTALL_REQUIRES = [
35    'grpcio>=1.49.0',
36    'protobuf>=4.21.6,<5.0dev',
37]
38SETUP_REQUIRES = INSTALL_REQUIRES + ['grpcio-tools']
39setuptools.setup(
40    name='xds-protos',
41    version='0.0.12',
42    packages=PACKAGES,
43    description='Generated Python code from envoyproxy/data-plane-api',
44    long_description_content_type='text/x-rst',
45    long_description=LONG_DESCRIPTION,
46    author='The gRPC Authors',
47    author_email='[email protected]',
48    url='https://grpc.io',
49    license='Apache License 2.0',
50    python_requires='>=3.7',
51    install_requires=INSTALL_REQUIRES,
52    setup_requires=SETUP_REQUIRES,
53    classifiers=CLASSIFIERS)
54