-
-
Notifications
You must be signed in to change notification settings - Fork 641
Description
🚀 feature request
Relevant Rules
pip_repository and by extension pip_parse.
Description
Because pip_repository is a repository rule, it somewhat awkwardly uses several attributes to override the default requirements file based exclusively on a limited selection of operating systems (linux, macos, windows).
Now that ARM is a more popular architecture and available on all three operating systems, we need a way to select among that axis as well. Otherwise, some wheels that have native dependencies may not be available on certain architectures. We may want to consider an "os version" as a third axis as well. For example, rawpy is available on MacOS but only on Intel, and possibly only MacOS 10.9 (I don't have a machine to test).
Describe the solution you'd like
Because it's awkward to add all possible combinations as new attributes, perhaps we should consider passing in a dictionary of tuples to match against fields in repository_os. The current implementation uses only .name. It's easy to add .arch to match against arch. It might be a little tricky to add "OS version" as it requires either adding a new field to repository_os (probably possible), or invoking a platform-dependent shell script.
Describe alternatives you've considered
Passing in a struct? It's more or less the same as a dictionary.