Skip to content

Commit

Permalink
Add includes configuration key
Browse files Browse the repository at this point in the history
  • Loading branch information
shumpohl committed Feb 10, 2025
1 parent 109a187 commit 0bf7091
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hatch_protobuf/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
for generator in self._generators:
args.append(f"--{generator.name}_out={generator.output_path}")

for include in self._includes:
args.append(f"-I{include}")

args += [str(p) for p in self._files.inputs] # cast to str for debug output

self.app.display_debug(f"Running {shlex.join(args)}")
Expand All @@ -69,6 +72,10 @@ def clean(self, versions: List[str]) -> None:
def _root_path(self) -> Path:
return Path(self.root)

@cached_property
def _includes(self) -> List[str]:
return self.config.get("includes", [])

@cached_property
def _default_proto_path(self) -> str:
builder = self.build_config.builder
Expand Down

0 comments on commit 0bf7091

Please sign in to comment.