Custom builder¶
これは、BuilderInterfaceから継承する特定のPythonファイル内のカスタムクラスです。
Configuration¶
ビルダープラグイン名はcustom
です。
[tool.hatch.build.targets.custom]
[build.targets.custom]
Options¶
Option | Default | Description |
---|---|---|
path | hatch_build.py | Pythonファイルのパス。 |
Example¶
from hatchling.builders.plugin.interface import BuilderInterface
class CustomBuilder(BuilderInterface):
...
複数のサブクラスが見つかった場合は、目的のビルダーを返すget_builder
という名前の関数を定義する必要があります。
Note
定義されたPLUGIN_NAMEは無視され、常にcustom
になります。