跳转至

Custom builder


This is a custom class in a given Python file that inherits from the BuilderInterface.

Configuration

The builder plugin name is custom.

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

Options

Option Default Description
path hatch_build.py The path of the Python file

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.

Note

Any defined PLUGIN_NAME is ignored and will always be custom.


最后更新: August 13, 2022