Make compiler dependencies optional

This commit is contained in:
Daniel G. Taylor
2019-10-22 21:08:30 -07:00
parent 5dae20970b
commit 109dc5a8a5
3 changed files with 17 additions and 5 deletions

View File

@@ -39,13 +39,17 @@ This project is a reimplementation from the ground up focused on idiomatic moder
## Installation & Getting Started
First, install the package:
First, install the package. Note that the `[compiler]` feature flag tells it to install extra dependencies only needed by the `protoc` plugin:
```sh
# Install both the library and compiler
$ pip install betterproto[compiler]
# Install just the library (to use the generated code output)
$ pip install betterproto
```
Now, given a proto file, e.g `example.proto`:
Now, given you installed the compiler and have a proto file, e.g `example.proto`:
```protobuf
syntax = "proto3";