1 # Copyright 2018 The gRPC Authors
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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 the GRPC Python package's Channelz."""
21 # Ensure we're in the proper directory whether or not we're being used by pip.
22 os.chdir(os.path.dirname(os.path.abspath(__file__)))
24 # Break import-style to ensure we can actually find our local modules.
28 class _NoOpCommand(setuptools.Command):
34 def initialize_options(self):
37 def finalize_options(self):
45 'Development Status :: 5 - Production/Stable',
46 'Programming Language :: Python',
47 'Programming Language :: Python :: 2',
48 'Programming Language :: Python :: 2.7',
49 'Programming Language :: Python :: 3',
50 'Programming Language :: Python :: 3.4',
51 'Programming Language :: Python :: 3.5',
52 'Programming Language :: Python :: 3.6',
53 'License :: OSI Approved :: Apache Software License',
56 PACKAGE_DIRECTORIES = {
62 'grpcio>={version}'.format(version=grpc_version.VERSION),
66 import channelz_commands as _channelz_commands
67 # we are in the build environment, otherwise the above import fails
69 'grpcio-tools=={version}'.format(version=grpc_version.VERSION),)
71 # Run preprocess from the repository *before* doing any packaging!
72 'preprocess': _channelz_commands.Preprocess,
73 'build_package_protos': _channelz_commands.BuildPackageProtos,
78 # wire up commands to no-op not to break the external dependencies
79 'preprocess': _NoOpCommand,
80 'build_package_protos': _NoOpCommand,
84 name='grpcio-channelz',
85 version=grpc_version.VERSION,
86 license='Apache License 2.0',
87 description='Channel Level Live Debug Information Service for gRPC',
88 author='The gRPC Authors',
89 author_email='grpc-io@googlegroups.com',
90 classifiers=CLASSIFIERS,
91 url='https://grpc.io',
92 package_dir=PACKAGE_DIRECTORIES,
93 packages=setuptools.find_packages('.'),
94 install_requires=INSTALL_REQUIRES,
95 setup_requires=SETUP_REQUIRES,
96 cmdclass=COMMAND_CLASS)