rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

internal(config_settings): make config_setting creation reusable

Open aignas opened this issue 1 year ago • 0 comments

The PR #1743 explored the idea of creating extra config settings for each target platform that our toolchain is targetting, however that has a drawback of not being usable in bzlmod if someone built Python for a platform that we don't provide a toolchain for and tried to use the pip.parse machinery with that by providing the python_interpreter_target. That is a niche usecase, but rules_python is a core ruleset that should only provide abstractions/helpers that work in all cases or make it possible to extend things.

This explores a way to decouple the definition of the available config_settings values and how they are constructed by adding an extra is_python_config_setting macro, that could be used to declare the config settings from within the pip.parse hub repo. This makes the work in #1744 to support whl-only hub repos more self-contained.

Supersedes #1743.

aignas avatar Feb 12 '24 03:02 aignas