78 lines
2.6 KiB
Text
78 lines
2.6 KiB
Text
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
http_archive(
|
|
name = "rules_python",
|
|
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz",
|
|
strip_prefix = "rules_python-0.0.2",
|
|
sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c",
|
|
)
|
|
|
|
load("@rules_python//python:repositories.bzl", "py_repositories")
|
|
|
|
py_repositories()
|
|
|
|
load("@rules_python//python:pip.bzl", "pip_repositories")
|
|
|
|
pip_repositories()
|
|
|
|
http_archive(
|
|
name = "rules_proto_grpc",
|
|
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/1.0.2.tar.gz"],
|
|
sha256 = "5f0f2fc0199810c65a2de148a52ba0aff14d631d4e8202f41aff6a9d590a471b",
|
|
strip_prefix = "rules_proto_grpc-1.0.2",
|
|
)
|
|
|
|
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_toolchains", "rules_proto_grpc_repos")
|
|
rules_proto_grpc_toolchains()
|
|
rules_proto_grpc_repos()
|
|
|
|
|
|
load("@rules_proto_grpc//python:repositories.bzl", rules_proto_grpc_python_repos="python_repos")
|
|
|
|
rules_proto_grpc_python_repos()
|
|
|
|
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
|
|
|
grpc_deps()
|
|
|
|
rules_python_external_version = "0.1.5"
|
|
|
|
http_archive(
|
|
name = "rules_python_external",
|
|
url = "https://github.com/dillon-giacoppo/rules_python_external/archive/v{version}.zip".format(version = rules_python_external_version),
|
|
sha256 = "bc655e6d402915944e014c3b2cad23d0a97b83a66cc22f20db09c9f8da2e2789",
|
|
strip_prefix = "rules_python_external-{version}".format(version = rules_python_external_version),
|
|
)
|
|
|
|
load("@rules_python_external//:repositories.bzl", "rules_python_external_dependencies")
|
|
rules_python_external_dependencies()
|
|
|
|
|
|
|
|
load("@rules_python//python:pip.bzl", "pip_import")
|
|
pip_import(
|
|
name = "rules_proto_grpc_py3_deps",
|
|
#python_interpreter = "python3",
|
|
requirements = "@rules_proto_grpc//python:requirements.txt",
|
|
)
|
|
|
|
load("@rules_proto_grpc_py3_deps//:requirements.bzl", pip3_install="pip_install")
|
|
pip3_install()
|
|
|
|
load("@rules_python_external//:defs.bzl", "pip_install")
|
|
pip_install(
|
|
name = "py_deps",
|
|
requirements = "//python:requirements.txt",
|
|
# (Optional) You can provide a python interpreter (by path):
|
|
#python_interpreter = "/usr/bin/python3.8",
|
|
# (Optional) Alternatively you can provide an in-build python interpreter, that is available as a Bazel target.
|
|
# This overrides `python_interpreter`.
|
|
# Note: You need to set up the interpreter target beforehand (not shown here). Please see the `example` folder for further details.
|
|
#python_interpreter_target = "@python_interpreter//:python_bin",
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|