| commit | 51f10470a906611979c5e62c92aa08648980bc94 | [log] [tgz] |
|---|---|---|
| author | Ignas Anikevicius <240938+aignas@users.noreply.github.com> | Sun Jan 12 22:15:02 2025 +0900 |
| committer | GitHub <noreply@github.com> | Sun Jan 12 13:15:02 2025 +0000 |
| tree | 147aaa0e35204ddee4572dcb5249d0b07a6349a0 | |
| parent | 4db0d919c8d12caa816c5b797bd28b0d457409d1 [diff] |
refactor(pypi): rename config settings and improve docs (#2556) Before the PR the `config_setting` names where following an internal logic and those names would be leaking into the error messages when no match is found. I thought that the names thus should be improved and maybe made more similar to the `whl` filename parts that they are derived from. As part of this change I have also added more docs and added them to sphinxdocs in the hopes that this documentation helps maintainers and users looking at error messages alike. Summary: * Make names more similar to the whl filenames. * Instead of having `osx_<cpu>_universal2` config settings for each `cpu` value, have a single `osx_universal2` config setting. * Stop creating redundant/unused config settings * Refactor the `_dist_config_setting` code to be simpler and create fewer targets by using a clever trick for the `whl` config setting flag value usage. The stats: ``` $ bazel query //tests/pypi/config_settings/... | rg ":(|_)is" | wc -l 2223 $ bazel query @dev_pip//_config/... | wc -l 1982 $ bazel query //tests/pypi/config_settings/... | rg ":(|_)is" | wc -l 1780 $ bazel query @dev_pip//_config/... | wc -l 1066 ``` Work towards #260
This repository is the home of the core Python rules -- py_library, py_binary, py_test, py_proto_library, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.