provide config_setting_group to match any pycross environment#217
Open
tobyh-canva wants to merge 1 commit intojvolkman:mainfrom
Open
provide config_setting_group to match any pycross environment#217tobyh-canva wants to merge 1 commit intojvolkman:mainfrom
config_setting_group to match any pycross environment#217tobyh-canva wants to merge 1 commit intojvolkman:mainfrom
Conversation
## Context We have situation in our repo where it'd be really convenient to be able to use `select()` to choose between "pycross-compatible platforms" and "non-pycross-compatible platforms". Right now, there isn't an easy way to declare this without guess-work and/or duplication of config (at least, not that I'm aware of). ## Intent Provide and document a convenient way to declare compatibility with any platforms which have a corresponding pycross environment configured. ## Changes Introduces a new `config_setting_group` in the `pycross_environments_repo` called `any_environment`, which matches any configured pycross environment. ## Example usage ```starlark # BUILD.bazel some_rule( name = "some_target", target_compatible_with = "@pycross_environments//:any_environment", ) ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
We have situation in our repo where it'd be really convenient to be able to use
select()to choose between "pycross-compatible platforms" and "non-pycross-compatible platforms". Right now, there isn't an easy way to declare this without guess-work and/or duplication of config (at least, not that I'm aware of). An example of a non-pycross-compatible platform in our repo is Android.Intent
Provide a convenient way to declare compatibility with any platforms which have a corresponding pycross environment configured.
Changes
Introduces a new
config_setting_groupin thepycross_environments_repocalledany_environment, which matches any configured pycross environment.Example usage