Extending wheyΒΆ
whey
can be extended to support building different distribution types (e.g. conda, DEB, RPM) or to modify the behaviour of an existing builder.
Custom builders must be registered as an entry point in the whey.builder
group. For example:
# pyproject.toml
[project.entry-points."whey.builder"]
whey_sdist = "whey.builder:SDistBuilder"
whey_wheel = "whey.builder:WheelBuilder"
# setup.cfg
[options.entry_points]
whey.builder =
whey_sdist = whey.builder:SDistBuilder
whey_wheel = whey.builder:WheelBuilder
Each builder must inherit from whey.builder.AbstractBuilder
.
The custom builders can be enabled by setting keys in the tool.whey.builders
table.
The table supports three keys: sdist
, wheel
, binary
.
The
sdist
builder is used when running whey with the--sdist
option or when using the PEP 517 backend to build an sdist.The
wheel
builder is used when running whey with the--wheel
option or when using the PEP 517 backend to build a wheel.The
binary
builder is used when running whey with the--binary
option.
The value for each key is the name of an entry point, such as whey_sdist
from the example above.