xref: /aosp_15_r20/external/grpc-grpc/src/python/grpcio_csds/setup.py (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1# Copyright 2021 The gRPC 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"""Setup module for CSDS in gRPC Python."""
15
16import os
17import sys
18
19import setuptools
20
21_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__))
22_README_PATH = os.path.join(_PACKAGE_PATH, "README.rst")
23
24# Ensure we're in the proper directory whether or not we're being used by pip.
25os.chdir(os.path.dirname(os.path.abspath(__file__)))
26
27# Break import-style to ensure we can actually find our local modules.
28import grpc_version
29
30CLASSIFIERS = [
31    "Development Status :: 5 - Production/Stable",
32    "Programming Language :: Python",
33    "Programming Language :: Python :: 3",
34    "License :: OSI Approved :: Apache Software License",
35]
36
37PACKAGE_DIRECTORIES = {
38    "": ".",
39}
40
41INSTALL_REQUIRES = (
42    "protobuf>=5.26.1,<6.0dev",
43    f"xds-protos=={grpc_version.VERSION}",
44    f"grpcio>={grpc_version.VERSION}",
45)
46SETUP_REQUIRES = INSTALL_REQUIRES
47
48setuptools.setup(
49    name="grpcio-csds",
50    version=grpc_version.VERSION,
51    license="Apache License 2.0",
52    description="xDS configuration dump library",
53    long_description=open(_README_PATH, "r").read(),
54    author="The gRPC Authors",
55    author_email="[email protected]",
56    classifiers=CLASSIFIERS,
57    url="https://grpc.io",
58    package_dir=PACKAGE_DIRECTORIES,
59    packages=setuptools.find_packages("."),
60    python_requires=">=3.8",
61    install_requires=INSTALL_REQUIRES,
62    setup_requires=SETUP_REQUIRES,
63)
64