Add numpy test to python_test_srcs target so that the python test wheel will have access to it.

PiperOrigin-RevId: 525498162
pull/12495/head
Deanna Garcia 2 years ago committed by Copybara-Service
parent e5679c01e8
commit 13833b1df0
  1. 16
      python/BUILD.bazel
  2. 7
      python/google/protobuf/internal/numpy/BUILD.bazel

@ -161,8 +161,10 @@ py_library(
srcs = glob([
"google/protobuf/internal/*_test.py",
]) + [
"google/protobuf/internal/test_util.py",
"google/protobuf/internal/import_test_package/__init__.py",
"google/protobuf/internal/test_util.py",
"//python/google/protobuf/internal/numpy:__init__.py",
"//python/google/protobuf/internal/numpy:numpy_test.py",
],
imports = ["python"],
srcs_version = "PY3",
@ -267,12 +269,12 @@ py_library(
],
imports = ["python"],
srcs_version = "PY2AND3",
visibility = ["//python:__subpackages__"],
deps = [
":protobuf_python",
":python_common_test_protos",
":python_specific_test_protos",
],
visibility = ["//python:__subpackages__"],
)
internal_py_test(
@ -429,13 +431,13 @@ pkg_files(
"google/protobuf/internal/import_test_package/__init__.py",
],
) + [
"README.md",
"google/__init__.py",
"setup.cfg",
"tox.ini",
"README.md",
"google/__init__.py",
"setup.cfg",
"tox.ini",
],
visibility = ["@upb//:__subpackages__"],
strip_prefix = "",
visibility = ["@upb//:__subpackages__"],
)
pkg_files(

@ -4,6 +4,12 @@
load("@pip_deps//:requirements.bzl", "requirement")
load("//python:internal.bzl", "internal_py_test")
# TODO: b/278896688 - Remove this target and replace with py_library
exports_files([
"__init__.py",
"numpy_test.py",
])
internal_py_test(
name = "numpy_test",
srcs = ["numpy_test.py"],
@ -11,6 +17,7 @@ internal_py_test(
requirement("numpy"),
],
visibility = [
"//python:__pkg__",
"@upb//python/pb_unit_tests:__pkg__",
]
)

Loading…
Cancel
Save