File tree Expand file tree Collapse file tree 4 files changed +22
-8
lines changed
providers/openfeature-provider-flagd Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Original file line number Diff line number Diff line change
1
+ proto /
Original file line number Diff line number Diff line change
1
+ version : v1
2
+ managed :
3
+ enabled : true
4
+ plugins :
5
+ - plugin : buf.build/protocolbuffers/python:v23.4
6
+ out : proto
7
+ - plugin : buf.build/grpc/python:v1.56.0
8
+ out : proto
Original file line number Diff line number Diff line change 1
1
# pyproject.toml
2
2
[build-system ]
3
- requires = [" hatchling" ]
3
+ requires = [" hatchling" , " hatch-build-scripts " ]
4
4
build-backend = " hatchling.build"
5
5
6
6
[project ]
@@ -28,13 +28,21 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
28
28
29
29
[tool .hatch ]
30
30
31
+ [[tool .hatch .build .hooks .build-scripts .scripts ]]
32
+ commands = [
33
+ " ./scripts/gen_protos.sh" ,
34
+ ]
35
+ artifacts = [" proto/**/*.py" ]
36
+ out_dir = " src/openfeature/contrib/provider/flagd"
37
+
31
38
[tool .hatch .envs .default ]
32
39
dependencies = [
33
40
" coverage[toml]>=6.5" ,
34
41
" pytest" ,
35
42
]
36
43
post-install-commands = [
37
- " ./scripts/gen_protos.sh"
44
+ " ./scripts/gen_protos.sh" ,
45
+ " rm -r src/openfeature/contrib/provider/flagd/proto && mv proto src/openfeature/contrib/provider/flagd" ,
38
46
]
39
47
40
48
[tool .hatch .envs .default .scripts ]
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- buf generate buf.build/open-feature/flagd --template schemas/protobuf/buf.gen.python.yaml --output schemas
6
- rm -rf openfeature/contrib/provider/flagd/proto
7
- sed -i.bak ' s/^from schema.v1 import/from . import/' proto/python/schema/v1/* .py
8
- rm proto/python/schema/v1/* .bak
9
- mv proto/python src/openfeature/contrib/provider/flagd/proto
10
- rmdir proto
5
+ buf generate buf.build/open-feature/flagd --template buf.gen.python.yaml
6
+ sed -i.bak ' s/^from schema.v1 import/from . import/' proto/schema/v1/* .py
7
+ rm proto/schema/v1/* .bak
You can’t perform that action at this time.
0 commit comments