Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d231cc

Browse files
committed
add docs
1 parent 6e92b13 commit 0d231cc

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/scyjava/_stubs/_hatchling.py

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1-
"""Hatchling build hook for generating Java stubs."""
1+
"""Hatchling build hook for generating Java stubs.
2+
3+
To use this hook, add the following to your `pyproject.toml`:
4+
5+
```toml
6+
[build-system]
7+
requires = ["hatchling", "scyjava"]
8+
build-backend = "hatchling.build"
9+
10+
[tool.hatch.build.hooks.scyjava]
11+
maven_coordinates = ["org.scijava:parsington:3.1.0"]
12+
prefixes = ["org.scijava"] # optional ... can be auto-determined from the jar files
13+
```
14+
15+
This will generate stubs for the given maven coordinates and prefixes. The generated
16+
stubs will be placed in `src/scyjava/types` and will be included in the wheel package.
17+
This hook is only run when building a wheel package.
18+
"""
219

320
import logging
4-
import shutil
521
from pathlib import Path
622

723
from hatchling.builders.hooks.plugin.interface import BuildHookInterface

0 commit comments

Comments
 (0)