|
@@ -1,5 +1,6 @@
|
|
-load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
load("@bazel_skylib//lib:versions.bzl", "versions")
|
|
load("@bazel_skylib//lib:versions.bzl", "versions")
|
|
|
|
+load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
+load("@rules_python//python:defs.bzl", "py_library", "py_test")
|
|
|
|
|
|
def _GetPath(ctx, path):
|
|
def _GetPath(ctx, path):
|
|
if ctx.label.workspace_root:
|
|
if ctx.label.workspace_root:
|
|
@@ -434,8 +435,7 @@ def py_proto_library(
|
|
|
|
|
|
if default_runtime and not default_runtime in py_libs + deps:
|
|
if default_runtime and not default_runtime in py_libs + deps:
|
|
py_libs = py_libs + [default_runtime]
|
|
py_libs = py_libs + [default_runtime]
|
|
-
|
|
|
|
- native.py_library(
|
|
|
|
|
|
+ py_library(
|
|
name = name,
|
|
name = name,
|
|
srcs = outs + py_extra_srcs,
|
|
srcs = outs + py_extra_srcs,
|
|
deps = py_libs + deps,
|
|
deps = py_libs + deps,
|
|
@@ -458,7 +458,7 @@ def internal_protobuf_py_tests(
|
|
"""
|
|
"""
|
|
for m in modules:
|
|
for m in modules:
|
|
s = "python/google/protobuf/internal/%s.py" % m
|
|
s = "python/google/protobuf/internal/%s.py" % m
|
|
- native.py_test(
|
|
|
|
|
|
+ py_test(
|
|
name = "py_%s" % m,
|
|
name = "py_%s" % m,
|
|
srcs = [s],
|
|
srcs = [s],
|
|
main = s,
|
|
main = s,
|