@@ -17,7 +17,6 @@ black = { version = ">=19.3b0", optional = true }
17
17
dataclasses = { version = " ^0.7" , python = " >=3.6, <3.7" }
18
18
grpclib = " ^0.4.1"
19
19
jinja2 = { version = " ^2.11.2" , optional = true }
20
- protobuf = { version = " ^3.12.2" , optional = true }
21
20
python-dateutil = " ^2.8"
22
21
23
22
[tool .poetry .dev-dependencies ]
@@ -26,7 +25,7 @@ bpython = "^0.19"
26
25
grpcio-tools = " ^1.30.0"
27
26
jinja2 = " ^2.11.2"
28
27
mypy = " ^0.770"
29
- poethepoet = " ^0.5 .0"
28
+ poethepoet = " >=0.9 .0"
30
29
protobuf = " ^3.12.2"
31
30
pytest = " ^5.4.2"
32
31
pytest-asyncio = " ^0.12.0"
@@ -43,7 +42,7 @@ asv = "^0.4.2"
43
42
protoc-gen-python_betterproto = " betterproto.plugin:main"
44
43
45
44
[tool .poetry .extras ]
46
- compiler = [" black" , " jinja2" , " protobuf " ]
45
+ compiler = [" black" , " jinja2" ]
47
46
48
47
[tool .poe .tasks ]
49
48
# Dev workflow tasks
@@ -55,6 +54,16 @@ docs = { cmd = "sphinx-build docs docs/build", help = "Build the sphinx d
55
54
bench = { shell = " asv run master^! && asv run HEAD^! && asv compare master HEAD" , help = " Benchmark current commit vs. master branch" }
56
55
clean = { cmd = " rm -rf .asv .coverage .mypy_cache .pytest_cache dist betterproto.egg-info **/__pycache__ tests/output_*" , help = " Clean out generated files from the workspace" }
57
56
57
+ generate_lib.cmd = """
58
+ protoc
59
+ --plugin=protoc-gen-custom=src/betterproto/plugin/main.py
60
+ --custom_opt=INCLUDE_GOOGLE
61
+ --custom_out=src/betterproto/lib
62
+ -I /usr/local/include/
63
+ /usr/local/include/google/protobuf/**/*.proto
64
+ """
65
+ generate_lib.help = " Regenerate the types in betterproto.lib.google"
66
+
58
67
# CI tasks
59
68
full-test = { shell = " poe generate && tox" , help = " Run tests with multiple pythons" }
60
69
check-style = { cmd = " black . --check --diff --exclude tests/output_" , help = " Check if code style is correct" }
0 commit comments