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
sdistbuilder is used when running whey with the--sdistoption or when using the PEP 517 backend to build an sdist.The
wheelbuilder is used when running whey with the--wheeloption or when using the PEP 517 backend to build a wheel.The
binarybuilder is used when running whey with the--binaryoption.
The value for each key is the name of an entry point, such as whey_sdist from the example above.