Skip to content

Commit

Permalink
Merge pull request #15 from jelmer/pyproject-example
Browse files Browse the repository at this point in the history
Add pyproject example
  • Loading branch information
jelmer authored Sep 4, 2023
2 parents 9529815 + 57e10d0 commit 6b44c34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ setup_requires =
requires = ["setuptools", "setuptools-protobuf"]

[tool.setuptools-protobuf]
protobufs = example/foo.proto
protobufs = ["example/foo.proto"]
```
7 changes: 5 additions & 2 deletions setuptools_protobuf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def run(self):
self.outfiles.extend(protobuf.outputs())

def get_inputs(self):
return [protobuf.path for protobuf in self.distribution.protobufs]
return [
protobuf.path
for protobuf in self.distribution.protobufs] # type: ignore

def get_outputs(self):
return self.outfiles
Expand Down Expand Up @@ -87,7 +89,8 @@ def pyprojecttoml_config(dist: Distribution) -> None:
return None

if cfg:
dist.protobufs = [Protobuf(pb) for pb in cfg.get("protobufs")]
dist.protobufs = [ # type: ignore
Protobuf(pb) for pb in cfg.get("protobufs")]


class Protobuf:
Expand Down

0 comments on commit 6b44c34

Please sign in to comment.