-
Notifications
You must be signed in to change notification settings - Fork 4
/
BUILD.bazel
57 lines (47 loc) · 1.47 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- python -*-
load(":expose_all_files.bzl", "expose_all_files")
load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair")
package(default_visibility = ["//visibility:public"])
py_runtime(
name = "py_runtime",
interpreter_path = "/usr/bin/python3",
python_version = "PY3",
visibility = ["//visibility:private"],
)
py_runtime_pair(
name = "py_runtime_pair",
py3_runtime = ":py_runtime",
visibility = ["//visibility:private"],
)
toolchain(
name = "py_toolchain",
toolchain = ":py_runtime_pair",
toolchain_type = "@rules_python//python:toolchain_type",
)
# Declared here to permit easier access to `cli` from external projects.
py_binary(
name = "cli",
srcs = ["//bazel_external_data:cli.py"],
visibility = ["//visibility:public"],
deps = [
"//bazel_external_data:cli_base",
"//bazel_external_data:core",
],
)
# Declared for archive stuff (should generally be internal).
py_binary(
name = "extract_archive",
srcs = ["extract_archive.py"],
)
exports_files(
srcs = ["exec.sh"],
)
# Bazel does not let us glob into `test/**`, even though the workspaces are not
# a package of this workspace. The solution is to declare the lint tests
# externally.
expose_all_files(
sub_packages = ["bazel_external_data"],
# We do not care about `test` for direct consumption, so do not expose it.
)
# Linting is not done here to simplify test dependencies.
# See :test/BUILD.bazel for how it is done.