1load("//tensorflow:tensorflow.bzl", "py_test")
2
3package(
4    licenses = ["notice"],  # Apache 2.0
5)
6
7filegroup(
8    name = "all_files",
9    srcs = glob(
10        ["**/*"],
11        exclude = [
12            "**/METADATA",
13            "**/OWNERS",
14        ],
15    ),
16    visibility = ["//tensorflow:__subpackages__"],
17)
18
19py_library(
20    name = "operators",
21    srcs = [
22        "__init__.py",
23        "conditional_expressions.py",
24        "control_flow.py",
25        "data_structures.py",
26        "exceptions.py",
27        "logical.py",
28        "py_builtins.py",
29        "slices.py",
30        "variables.py",
31    ],
32    srcs_version = "PY3",
33    visibility = ["//tensorflow:__subpackages__"],
34    deps = [
35        "//tensorflow/python:array_ops",
36        "//tensorflow/python:constant_op",
37        "//tensorflow/python:control_flow_ops",
38        "//tensorflow/python:control_flow_util",
39        "//tensorflow/python:dtypes",
40        "//tensorflow/python:framework_ops",
41        "//tensorflow/python:list_ops",
42        "//tensorflow/python:tensor_array_ops",
43        "//tensorflow/python:tensor_util",
44        "//tensorflow/python:util",
45        "//tensorflow/python:variables",
46        "//tensorflow/python/autograph/utils",
47        "//tensorflow/python/data/experimental/ops:cardinality",
48        "//tensorflow/python/data/experimental/ops:scan_ops",
49        "//tensorflow/python/data/experimental/ops:take_while_ops",
50        "//tensorflow/python/data/ops:dataset_ops",
51        "//third_party/py/numpy",
52    ],
53)
54
55py_test(
56    name = "data_structures_test",
57    srcs = ["data_structures_test.py"],
58    python_version = "PY3",
59    srcs_version = "PY3",
60    deps = [
61        ":operators",
62        "//tensorflow/python:client_testlib",
63    ],
64)
65
66py_test(
67    name = "conditional_expressions_test",
68    srcs = ["conditional_expressions_test.py"],
69    python_version = "PY3",
70    srcs_version = "PY3",
71    deps = [
72        ":operators",
73        "//tensorflow/python:client_testlib",
74    ],
75)
76
77py_test(
78    name = "control_flow_test",
79    srcs = ["control_flow_test.py"],
80    python_version = "PY3",
81    srcs_version = "PY3",
82    tags = [
83        "no_gpu",  # b/127001953
84    ],
85    deps = [
86        ":operators",
87        "//tensorflow/python:client_testlib",
88        # TODO(b/145618471): Remove this transitive dependency.
89        "//tensorflow/python/distribute:input_lib",
90    ],
91)
92
93py_test(
94    name = "exceptions_test",
95    srcs = ["exceptions_test.py"],
96    python_version = "PY3",
97    srcs_version = "PY3",
98    deps = [
99        ":operators",
100        "//tensorflow/python:client_testlib",
101    ],
102)
103
104py_test(
105    name = "logical_test",
106    srcs = ["logical_test.py"],
107    python_version = "PY3",
108    srcs_version = "PY3",
109    deps = [
110        ":operators",
111        "//tensorflow/python:client_testlib",
112    ],
113)
114
115py_test(
116    name = "py_builtins_test",
117    srcs = ["py_builtins_test.py"],
118    python_version = "PY3",
119    srcs_version = "PY3",
120    deps = [
121        ":operators",
122        "//tensorflow/python:client_testlib",
123        "//tensorflow/python/autograph/core",
124        # TODO(b/145618471): Remove this transitive dependency.
125        "//tensorflow/python/distribute:input_lib",
126        "//tensorflow/python/ops/parallel_for:control_flow_ops",
127        "//tensorflow/python/ops/signal",
128    ],
129)
130
131py_test(
132    name = "slices_test",
133    srcs = ["slices_test.py"],
134    python_version = "PY3",
135    srcs_version = "PY3",
136    deps = [
137        ":operators",
138        "//tensorflow/python:client_testlib",
139    ],
140)
141
142py_test(
143    name = "variables_test",
144    srcs = ["variables_test.py"],
145    python_version = "PY3",
146    srcs_version = "PY3",
147    deps = [
148        ":operators",
149        "//tensorflow/python:client_testlib",
150    ],
151)
152