aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_health_checking
diff options
context:
space:
mode:
authorGravatar Lidi Zheng <lidiz@google.com>2018-12-05 14:51:07 -0800
committerGravatar Lidi Zheng <lidiz@google.com>2018-12-05 15:25:48 -0800
commit5584d58e6ce3dbc2f110f1096dfd739b1cb2ce18 (patch)
tree448346fa1eefb865ad9c3bc90921347e58d5f3dd /src/python/grpcio_health_checking
parent8d438057e42864e0a53217cd7b8d1636d5842422 (diff)
Add LICENSE to grpcio-* packages
* Using the proprocess command to copy the LICENSE
Diffstat (limited to 'src/python/grpcio_health_checking')
-rw-r--r--src/python/grpcio_health_checking/MANIFEST.in1
-rw-r--r--src/python/grpcio_health_checking/health_commands.py8
-rw-r--r--src/python/grpcio_health_checking/setup.py2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/python/grpcio_health_checking/MANIFEST.in b/src/python/grpcio_health_checking/MANIFEST.in
index 996c74a9d4..3a22311b8e 100644
--- a/src/python/grpcio_health_checking/MANIFEST.in
+++ b/src/python/grpcio_health_checking/MANIFEST.in
@@ -1,3 +1,4 @@
include grpc_version.py
recursive-include grpc_health *.py
global-exclude *.pyc
+include LICENSE
diff --git a/src/python/grpcio_health_checking/health_commands.py b/src/python/grpcio_health_checking/health_commands.py
index 933f965aa2..3820ef0bba 100644
--- a/src/python/grpcio_health_checking/health_commands.py
+++ b/src/python/grpcio_health_checking/health_commands.py
@@ -20,10 +20,12 @@ import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
HEALTH_PROTO = os.path.join(ROOT_DIR, '../../proto/grpc/health/v1/health.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 = []
@@ -39,6 +41,8 @@ class CopyProtoModules(setuptools.Command):
shutil.copyfile(HEALTH_PROTO,
os.path.join(ROOT_DIR,
'grpc_health/v1/health.proto'))
+ if os.path.isfile(LICENSE):
+ shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))
class BuildPackageProtos(setuptools.Command):
diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py
index db2edae2ce..5a09a80f6a 100644
--- a/src/python/grpcio_health_checking/setup.py
+++ b/src/python/grpcio_health_checking/setup.py
@@ -68,7 +68,7 @@ try:
'grpcio-tools=={version}'.format(version=grpc_version.VERSION),)
COMMAND_CLASS = {
# Run preprocess from the repository *before* doing any packaging!
- 'preprocess': _health_commands.CopyProtoModules,
+ 'preprocess': _health_commands.Preprocess,
'build_package_protos': _health_commands.BuildPackageProtos,
}
except ImportError: