load("@grpc_python_dependencies//:requirements.bzl", "requirement")

package(default_visibility = ["//visibility:public"])

py_library(
    name = "grpcio",
    srcs = ["__init__.py"],
    deps = [
        ":utilities",
        ":auth",
        ":plugin_wrapping",
        ":channel",
        ":interceptor",
        ":server",
        "//src/python/grpcio/grpc/_cython:cygrpc",
        "//src/python/grpcio/grpc/beta",
        "//src/python/grpcio/grpc/experimental",
        "//src/python/grpcio/grpc/framework",
        requirement('enum34'),
        requirement('six'),
    ],
    data = [
        "//:grpc",
    ],
    imports = ["../",],
)

py_library(
    name = "auth",
    srcs = ["_auth.py"],
)

py_library(
    name = "channel",
    srcs = ["_channel.py"],
    deps = [
        ":common",
        ":grpcio_metadata",
    ],
)

py_library(
    name = "common",
    srcs = ["_common.py"],
)

py_library(
    name = "grpcio_metadata",
    srcs = ["_grpcio_metadata.py"],
)

py_library(
    name = "interceptor",
    srcs = ["_interceptor.py"],
)

py_library(
    name = "plugin_wrapping",
    srcs = ["_plugin_wrapping.py"],
    deps = [
        ":common",
    ]
)

py_library(
    name = "server",
    srcs = ["_server.py"],
    deps = [
        ":common",
        ":interceptor",
    ],
)

py_library(
    name = "utilities",
    srcs = ["_utilities.py"],
    deps = [
        ":common",
    ],
)