aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_reflection/reflection_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_reflection/reflection_commands.py')
-rw-r--r--src/python/grpcio_reflection/reflection_commands.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/python/grpcio_reflection/reflection_commands.py b/src/python/grpcio_reflection/reflection_commands.py
index 6f91f6b875..311ca4c4db 100644
--- a/src/python/grpcio_reflection/reflection_commands.py
+++ b/src/python/grpcio_reflection/reflection_commands.py
@@ -21,10 +21,12 @@ import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
REFLECTION_PROTO = os.path.join(
ROOT_DIR, '../../proto/grpc/reflection/v1alpha/reflection.proto')
+LICENSE = os.path.join(ROOT_DIR, '../../../LICENSE')
-class CopyProtoModules(setuptools.Command):
- """Command to copy proto modules from grpc/src/proto."""
+class Preprocess(setuptools.Command):
+ """Command to copy proto modules from grpc/src/proto and LICENSE from
+ the root directory"""
description = ''
user_options = []
@@ -41,6 +43,8 @@ class CopyProtoModules(setuptools.Command):
REFLECTION_PROTO,
os.path.join(ROOT_DIR,
'grpc_reflection/v1alpha/reflection.proto'))
+ if os.path.isfile(LICENSE):
+ shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))
class BuildPackageProtos(setuptools.Command):