Skip to content

Custom builderカスタムビルダー


This is a custom class in a given Python file that inherits from the BuilderInterface.これは、BuilderInterfaceから継承する特定のPythonファイル内のカスタムクラスです。

Configuration設定

The builder plugin name is custom.ビルダープラグイン名は custom です。

[tool.hatch.build.targets.custom]
[build.targets.custom]

Optionsオプション

Optionオプション Defaultデフォルト Description説明
pathpath hatch_build.pyhatch_build.py The path of the Python filePythonファイルのパス

Example

from hatchling.builders.plugin.interface import BuilderInterface


class CustomBuilder(BuilderInterface):
    ...

If multiple subclasses are found, you must define a function named get_builder that returns the desired builder.複数のサブクラスが見つかった場合は、目的のビルダーを返す get_builder という名前の関数を定義する必要があります。

Note注意

Any defined PLUGIN_NAME is ignored and will always be custom.定義されたPLUGIN_NAMEは無視され、常に custom になります。