1# Copyright 2009 The RE2 Authors. All Rights Reserved. 2# Use of this source code is governed by a BSD-style 3# license that can be found in the LICENSE file. 4 5# Bazel (http://bazel.build/) BUILD file for RE2 Python. 6 7load("@pybind11_bazel//:build_defs.bzl", "pybind_extension") 8load("@rules_python//python:defs.bzl", "py_library", "py_test") 9 10pybind_extension( 11 name = "_re2", 12 srcs = ["_re2.cc"], 13 deps = [ 14 "//:re2", 15 "@com_google_absl//absl/strings", 16 ], 17) 18 19py_library( 20 name = "re2", 21 srcs = ["re2.py"], 22 data = [":_re2.so"], 23 imports = ["."], 24 visibility = ["//visibility:public"], 25) 26 27py_test( 28 name = "re2_test", 29 size = "small", 30 srcs = ["re2_test.py"], 31 deps = [ 32 ":re2", 33 "@abseil-py//absl/testing:absltest", 34 "@abseil-py//absl/testing:parameterized", 35 ], 36) 37