Skip to content

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になります。