| commit | 72ddf0c9473a1f49b361b082fc24c028aa791019 | [log] [tgz] |
|---|---|---|
| author | Richard Levasseur <rlevasseur@google.com> | Tue Oct 22 10:58:57 2024 -0700 |
| committer | GitHub <noreply@github.com> | Tue Oct 22 17:58:57 2024 +0000 |
| tree | 1719d8177572baa0e4dbd2ce042938f764ca7492 | |
| parent | 1a92c979595ce6bab6575822c75175e4913ea879 [diff] |
fix(rules): remove rules_python --incompatible_python_disallow_native_rules checking (#2327) When --incompatible_python_disallow_native_rules is enabled, all the core rules fail with an error that rules_python should be used. This is incorrect, since the rules_python rules are being used. What's happening is https://github.com/bazelbuild/rules_python/pull/2257 removed the magic migration tag when pystar is enabled, but the code to check the tag was present wasn't removed. This went unnoticed because our CI doesn't set the migration flag. To fix, remove the validation logic entirely. If we're in the rules_python implementation, then there is not need to perform this validation. It was just something copy/pasted from the original code from Bazel itself. Also update the bazelrc to always set --incompatible_python_disallow_native_rules. Fixes https://github.com/bazelbuild/rules_python/issues/2326 Fixes https://github.com/bazelbuild/rules_python/issues/1645
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.