1load("//tensorflow:tensorflow.bzl", "tf_py_test") 2 3package( 4 licenses = ["notice"], # Apache 2.0 5) 6 7exports_files(["LICENSE"]) 8 9py_library( 10 name = "v2_compat", 11 srcs = ["v2_compat.py"], 12 srcs_version = "PY2AND3", 13 visibility = ["//tensorflow:internal"], 14 deps = [ 15 "//tensorflow/python:control_flow_v2_toggles", 16 "//tensorflow/python:tf2", 17 "//tensorflow/python:util", 18 "//tensorflow/python/eager:monitoring", 19 ], 20) 21 22py_library( 23 name = "compat", 24 srcs = ["compat.py"], 25 srcs_version = "PY2AND3", 26 visibility = ["//tensorflow:internal"], 27 deps = [ 28 "//tensorflow/python:util", 29 ], 30) 31 32tf_py_test( 33 name = "compat_test", 34 size = "small", 35 srcs = ["compat_test.py"], 36 tags = ["nofwdcompat"], 37 deps = [ 38 ":compat", 39 "//tensorflow/python:client_testlib", 40 ], 41) 42 43tf_py_test( 44 name = "disable_v2_behavior_test", 45 size = "small", 46 srcs = ["disable_v2_behavior_test.py"], 47 deps = [ 48 ":v2_compat", 49 "//tensorflow/python:client_testlib", 50 "//tensorflow/python:framework", 51 ], 52) 53