Fix name PROTOBUF_OPTS -> BETTERPROTO_OPTS

This commit is contained in:
Bouke Versteegh 2020-06-01 23:11:20 +02:00 committed by boukeversteegh
parent 973d68a154
commit cb00273257

View File

@ -360,12 +360,12 @@ $ pipenv run test
Betterproto includes compiled versions for Google's well-known types at [betterproto/lib/google](betterproto/lib/google). Betterproto includes compiled versions for Google's well-known types at [betterproto/lib/google](betterproto/lib/google).
Be sure to regenerate these files when modifying the plugin output format, and validate by running the tests. Be sure to regenerate these files when modifying the plugin output format, and validate by running the tests.
Normally, the plugin does not compile any references to `google.protobuf`, since they are pre-compiled. To force compilation of `google.protobuf`, set this environment variable: `PROTOBUF_OPTS=INCLUDE_GOOGLE`. Normally, the plugin does not compile any references to `google.protobuf`, since they are pre-compiled. To force compilation of `google.protobuf`, set this environment variable: `BETTERPROTO_OPTS=INCLUDE_GOOGLE`.
Assuming your `google.protobuf` source files (included with all releases of `protoc`) are located in `/usr/local/include`, you can regenerate them as follows: Assuming your `google.protobuf` source files (included with all releases of `protoc`) are located in `/usr/local/include`, you can regenerate them as follows:
```sh ```sh
export PROTOBUF_OPTS=INCLUDE_GOOGLE export BETTERPROTO_OPTS=INCLUDE_GOOGLE
protoc --plugin=protoc-gen-custom=betterproto/plugin.py --custom_out=betterproto/lib -I/usr/local/include/ /usr/local/include/google/protobuf/*.proto protoc --plugin=protoc-gen-custom=betterproto/plugin.py --custom_out=betterproto/lib -I/usr/local/include/ /usr/local/include/google/protobuf/*.proto
``` ```