python-wheel-build / fromager

Build your own wheels
https://fromager.readthedocs.io/en/latest/
Apache License 2.0
7 stars 11 forks source link

Variant specific package plugins #413

Open shubhbapna opened 1 month ago

shubhbapna commented 1 month ago

Is it possible to have package plugins specific to a variant instead of using if ctx.variant.startswith("varinat") everywhere in plugin code

tiran commented 1 month ago

One idea is to check for a function with normalized variant name as suffix, e.g. first look for prepare_source_cuda, then for prepare_source, and then fall back to default_prepare_source.