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

py_library(
    name = "grpcio",
    srcs = ["__init__.py"],
    deps = [
        ":utilities",
        ":auth",
        ":plugin_wrapping",
        ":channel",
        ":interceptor",
        ":server",
        ":compression",
        "//src/python/grpcio/grpc/_cython:cygrpc",
        "//src/python/grpcio/grpc/experimental",
        "//src/python/grpcio/grpc/framework",
        "@six_archive//:six",
    ] + select({
        "//conditions:default": ["@enum34//:enum34",],
        "//:python3": [],
    }),
    data = [
        "//:grpc",
    ],
    imports = ["../",],
)

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

py_library(
    name = "compression",
    srcs = ["_compression.py"],
)

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

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",
        ":compression",
        ":interceptor",
    ],
)

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

