Skip to content
Snippets Groups Projects
Commit 71448b28 authored by Masood Malekghassemi's avatar Masood Malekghassemi
Browse files

Use open-source defaults to propagate Python plugin configuration

parent 94f0a50d
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,9 @@ using std::vector;
namespace grpc_python_generator {
GeneratorConfiguration::GeneratorConfiguration()
: grpc_package_root("grpc"), beta_package_root("grpc.beta") {}
PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config)
: config_(config) {}
......
......@@ -43,6 +43,7 @@ namespace grpc_python_generator {
// Data pertaining to configuration of the generator with respect to anything
// that may be used internally at Google.
struct GeneratorConfiguration {
GeneratorConfiguration();
grpc::string grpc_package_root;
grpc::string beta_package_root;
};
......
......@@ -38,8 +38,6 @@
int main(int argc, char* argv[]) {
grpc_python_generator::GeneratorConfiguration config;
config.grpc_package_root = "grpc";
config.beta_package_root = "grpc.beta";
grpc_python_generator::PythonGrpcGenerator generator(config);
return grpc::protobuf::compiler::PluginMain(argc, argv, &generator);
}
......@@ -45,7 +45,6 @@ int protoc_main(int argc, char* argv[]) {
// gRPC Python
grpc_python_generator::GeneratorConfiguration grpc_py_config;
grpc_py_config.beta_package_root = "grpc.beta";
grpc_python_generator::PythonGrpcGenerator grpc_py_generator(grpc_py_config);
cli.RegisterGenerator("--grpc_python_out", &grpc_py_generator,
"Generate Python source file.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment