10000 fix inclusion · scijava/scyjava@6e92b13 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6e92b13

Browse files
committed
fix inclusion
1 parent 6e4181e commit 6e92b13

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/scyjava/_stubs/_hatchling.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@ def initialize(self, version: str, build_data: dict) -> None:
3030

3131
prefixes = self.config.get("prefixes", [])
3232
dest = Path(self.root, "src", "scyjava", "types")
33+
(dest.parent / "py.typed").touch()
3334

3435
# actually build the stubs
35-
generate_stubs(endpoints=endpoints, prefixes=prefixes, output_dir=dest)
36+
generate_stubs(
37+
endpoints=endpoints,
38+
prefixes=prefixes,
39+
output_dir=dest,
40+
remove_namespace_only_stubs=True,
41+
)
3642
print(f"Generated stubs for {endpoints} in {dest}")
3743
# add all new packages to the build config
38-
build_data["artifacts"].append("src/scyjava/types")
44+
build_data["force_include"].update({str(dest.parent): "scyjava"})
3945

4046

4147
@hookimpl

0 commit comments

Comments
 (0)
0