Bump upb version and refactor python compatibility.
This pulls in updates to system_python, which allows for better handling of our non-hermetic setup. Specifically, our python tests are marked incompatible on systems without a python installation. This will cause them to get skipped by wildcard expansions (which is why we add 1 explicit target to the kokoro builds).
PiperOrigin-RevId: 492286518
diff --git a/python/internal.bzl b/python/internal.bzl
index e9bcb27..d9ba37e 100644
--- a/python/internal.bzl
+++ b/python/internal.bzl
@@ -106,3 +106,20 @@
}),
**kwargs
)
+
+def internal_py_test(deps = [], **kwargs):
+ """Internal wrapper for shared test configuration
+
+ Args:
+ deps: any additional dependencies of the test.
+ **kwargs: arguments forwarded to py_test.
+ """
+ native.py_test(
+ imports = ["."],
+ deps = deps + [":python_test_lib"],
+ target_compatible_with = select({
+ "@system_python//:supported": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ **kwargs
+ )