| 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 |
|
| 17 |
import os |
| 18 |
|
| 19 |
import setuptools |
| 20 |
|
| 21 |
WORK_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 22 |
EXCLUDE_PYTHON_FILES = ['generated_file_import_test.py', 'build.py'] |
| 23 |
|
| 24 |
# Use setuptools to build Python package |
| 25 |
with open(os.path.join(WORK_DIR, 'README.rst'), 'r') as f: |
| 26 |
LONG_DESCRIPTION = f.read() |
| 27 |
PACKAGES = setuptools.find_packages(where=".", exclude=EXCLUDE_PYTHON_FILES) |
| 28 |
CLASSIFIERS = [ |
| 29 |
'Development Status :: 3 - Alpha', |
| 30 |
'Programming Language :: Python', |
| 31 |
'Programming Language :: Python :: 3', |
| 32 |
'License :: OSI Approved :: Apache Software License', |
| 33 |
] |
| 34 |
INSTALL_REQUIRES = [ |
| 35 |
'grpcio>=1.49.0', |
| 36 |
'protobuf>=4.21.6,<5.0dev', |
| 37 |
] |
| 38 |
SETUP_REQUIRES = INSTALL_REQUIRES + ['grpcio-tools'] |
| 39 |
setuptools.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) |