load("//tensorflow:tensorflow.bzl", "filegroup")
load("//tensorflow:tensorflow.bzl", "py_strict_binary")

package(
    licenses = ["notice"],  # Apache 2.0
)

# Run this binary manually, with an argument pointing to the testdata/
# directory, to generate the test files used by the filegroup rule below.
py_strict_binary(
    name = "gen_saved_models",
    srcs = ["gen_saved_models.py"],
    python_version = "PY3",
    deps = [
        "//tensorflow/python:dtypes",
        "//tensorflow/python:platform",
        "//tensorflow/python:resource_variable_ops",
        "//tensorflow/python:tensor_spec",
        "//tensorflow/python:variables",
        "//tensorflow/python/compat:v2_compat",
        "//tensorflow/python/eager:def_function",
        "//tensorflow/python/module",
        "//tensorflow/python/saved_model",
        "//tensorflow/python/saved_model:save_options",
    ],
)

# Files generated by the binary above.
filegroup(
    name = "saved_models",
    srcs = glob([
        "UninitializedVariable/**",
    ]),
    visibility = [
        "//tensorflow/c/experimental/saved_model/internal:__pkg__",
    ],
)
