@@ -6,11 +6,20 @@ authors = [
66 { name = " Adrien Vannson" , email = " adrien.vannson@protonmail.com" },
77 { name = " Daniel G. Taylor" , email = " danielgtaylor@gmail.com" },
88]
9- readme = " README.md"
10- keywords = [" protobuf" , " gRPC" , " compiler" ]
11- license = " MIT"
129requires-python = " >=3.10,<4.0"
13- dynamic = [" dependencies" ]
10+ license = " MIT"
11+ keywords = [
12+ " protobuf" ,
13+ " gRPC" ,
14+ " compiler" ,
15+ ]
16+ dependencies = [
17+ " betterproto2[grpclib]>=0.5.1,<0.6" ,
18+ " ruff~=0.9.3" ,
19+ " jinja2>=3.0.3" ,
20+ " typing-extensions>=4.7.1,<5" ,
21+ " strenum>=0.4.15,<0.5 ; python_version == '3.10'" ,
22+ ]
1423
1524[project .urls ]
1625Documentation = " https://betterproto.github.io/python-betterproto2-compiler/"
@@ -19,36 +28,39 @@ Repository = "https://github.com/betterproto/python-betterproto2-compiler"
1928[project .scripts ]
2029protoc-gen-python_betterproto2 = " betterproto2_compiler.plugin:main"
2130
22- [tool .poetry ]
23- packages = [
24- { include = " betterproto2_compiler" , from = " src" }
31+ [dependency-groups ]
32+ dev = [
33+ " pre-commit>=2.17.0,<3" ,
34+ " grpcio-tools>=1.54.2,<2" ,
35+ " mkdocs-material>=9.5.49,<10" ,
36+ " mkdocstrings[python]>=0.27.0,<0.28" ,
37+ " poethepoet>=0.32.2,<0.33" ,
38+ " pyright>=1.1.391,<2" ,
39+ " ipykernel>=6.29.5,<7" ,
40+ ]
41+ test = [
42+ " pytest>=8.3.4,<9" ,
43+ " protobuf>=5.29.3,<6" ,
2544]
2645
27- [tool .poetry .dependencies ]
28- python = " ^3.10"
29- betterproto2 = { version = " ^0.5.1" , extras = [" grpclib" ] }
30- # betterproto2 = { git="https://github.com/betterproto/python-betterproto2" }
31- # betterproto2 = { path = "../python-betterproto2", extras = ["grpclib"] }
32- # The Ruff version is pinned. To update it, also update it in .pre-commit-config.yaml
33- ruff = " ~0.9.3"
34- jinja2 = " >=3.0.3"
35- typing-extensions = " ^4.7.1"
36- strenum = [
37- {version = " ^0.4.15" , python = " =3.10" },
46+ [tool .uv ]
47+ default-groups = [
48+ " dev" ,
49+ " test" ,
3850]
3951
40- [tool .poetry .group .dev .dependencies ]
41- pre-commit = " ^2.17.0"
42- grpcio-tools = " ^1.54.2"
43- mkdocs-material = {version = " ^9.5.49" }
44- mkdocstrings = {version = " ^0.27.0" , extras = [" python" ]}
45- poethepoet = " ^0.32.2"
46- pyright = " ^1.1.391"
47- ipykernel = " ^6.29.5"
52+ [tool .hatch .build .targets .sdist ]
53+ include = [" src/betterproto2_compiler" ]
54+
55+ [tool .hatch .build .targets .wheel ]
56+ include = [" src/betterproto2_compiler" ]
4857
49- [tool .poetry .group .test .dependencies ]
50- pytest = " ^8.3.4"
51- protobuf = " ^5.29.3"
58+ [tool .hatch .build .targets .wheel .sources ]
59+ "src/betterproto2_compiler" = " betterproto2_compiler"
60+
61+ [build-system ]
62+ requires = [" hatchling" ]
63+ build-backend = " hatchling.build"
5264
5365[tool .ruff ]
5466extend-exclude = [" tests/output_*" , " src/betterproto2_compiler/lib" ]
@@ -71,12 +83,9 @@ select = [
7183 " I" ,
7284]
7385
74-
7586[tool .ruff .lint .isort ]
7687combine-as-imports = true
7788
78- # Dev workflow tasks
79-
8089[tool .poe .tasks .test ]
8190cmd = " pytest"
8291help = " Run tests"
@@ -150,10 +159,6 @@ help = "Check the code with the Ruff linter"
150159cmd = " mkdocs serve"
151160help = " Serve the documentation locally"
152161
153- [build-system ]
154- requires = [" poetry-core>=2.0.0,<3" ]
155- build-backend = " poetry.core.masonry.api"
156-
157162# python -m grpc.tools.protoc \
158163# --python_betterproto2_out=src/lib2 \
159164# google/protobuf/any.proto \
0 commit comments