setup.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. import os
  17. import setuptools
  18. WORK_DIR = os.path.dirname(os.path.abspath(__file__))
  19. EXCLUDE_PYTHON_FILES = ['generated_file_import_test.py', 'build.py']
  20. # Use setuptools to build Python package
  21. with open(os.path.join(WORK_DIR, 'README.rst'), 'r') as f:
  22. LONG_DESCRIPTION = f.read()
  23. PACKAGES = setuptools.find_packages(where=".", exclude=EXCLUDE_PYTHON_FILES)
  24. CLASSIFIERS = [
  25. 'Development Status :: 3 - Alpha',
  26. 'Programming Language :: Python',
  27. 'Programming Language :: Python :: 3',
  28. 'License :: OSI Approved :: Apache Software License',
  29. ]
  30. INSTALL_REQUIRES = [
  31. 'grpcio',
  32. 'protobuf',
  33. ]
  34. SETUP_REQUIRES = INSTALL_REQUIRES + ['grpcio-tools']
  35. setuptools.setup(
  36. name='xds-protos',
  37. version='0.0.11',
  38. packages=PACKAGES,
  39. description='Generated Python code from envoyproxy/data-plane-api',
  40. long_description_content_type='text/x-rst',
  41. long_description=LONG_DESCRIPTION,
  42. author='The gRPC Authors',
  43. author_email='grpc-io@googlegroups.com',
  44. url='https://grpc.io',
  45. license='Apache License 2.0',
  46. python_requires='>=3.6',
  47. install_requires=INSTALL_REQUIRES,
  48. setup_requires=SETUP_REQUIRES,
  49. classifiers=CLASSIFIERS)