From 96eb1a9a985135566b720da220a1fb20ef978ee4 Mon Sep 17 00:00:00 2001 From: Chester Leung Date: Thu, 8 Apr 2021 14:17:14 -0700 Subject: [PATCH] Generate protos before installing Python package (#143) --- python-package/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-package/setup.py b/python-package/setup.py index abed9c5d4..35398f2c4 100644 --- a/python-package/setup.py +++ b/python-package/setup.py @@ -26,6 +26,8 @@ except ValueError: continue +print("Updating protos") +subprocess.run(["python3", "-m", "grpc_tools.protoc", "-I", "securexgboost/rpc/protos", "--python_out=securexgboost/rpc", "--grpc_python_out=securexgboost/rpc", "securexgboost/rpc/protos/remote.proto", "securexgboost/rpc/protos/ndarray.proto"]) print("Install libxgboost from: %s" % LIB_PATH) # Please use setup_pip.py for generating and deploying pip installation @@ -58,5 +60,3 @@ python_requires='>=3.4', url='https://github.com/dmlc/xgboost') -print("Updating protos") -subprocess.run(["python3", "-m", "grpc_tools.protoc", "-I", "securexgboost/rpc/protos", "--python_out=securexgboost/rpc", "--grpc_python_out=securexgboost/rpc", "securexgboost/rpc/protos/remote.proto", "securexgboost/rpc/protos/ndarray.proto"])