Skip to content

Commit 6a39f07

Browse files
Make grpclib optional (#67)
* Make grpclib optional * Update CI * Add all extra * Update documentation
1 parent bd35e5f commit 6a39f07

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- name: Install dependencies
5656
shell: bash
57-
run: poetry install
57+
run: poetry install -E grpc-async
5858

5959
- name: Download compiled test files
6060
shell: bash
@@ -66,7 +66,7 @@ jobs:
6666

6767
- name: Install dependencies with the Rust codec
6868
shell: bash
69-
run: poetry install -E rust-codec
69+
run: poetry install -E grpc-async -E rust-codec
7070

7171
- name: Execute test suite with the Rust codec
7272
shell: bash

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Getting Started
66
The package `betterproto2` can be simply installed from PyPI using `pip`:
77

88
```sh
9-
pip install betterproto2
9+
pip install betterproto2[all]
1010
```
1111

1212
!!! info

poetry.lock

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ Repository = "https://github.com/betterproto/python-betterproto2"
1818

1919
[project.optional-dependencies]
2020
rust-codec = ["betterproto2-rust-codec"]
21+
grpc-async = ["grpclib"]
22+
all = ["betterproto2-rust-codec", "grpclib"]
2123

2224
[tool.poetry]
2325
packages = [
2426
{ include = "betterproto2", from = "src" }
2527
]
2628

2729
[tool.poetry.dependencies]
28-
grpclib = "^0.4.1"
30+
grpclib = { version = "^0.4.1", optional = true }
2931
python-dateutil = "^2.8"
3032
typing-extensions = "^4.7.1"
3133
betterproto2-rust-codec = { version = "^0.1.2", optional = true }

0 commit comments

Comments
 (0)