-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD
50 lines (44 loc) · 949 Bytes
/
BUILD
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
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@com_github_aignas_rules_shellcheck//:def.bzl", "shellcheck_test")
py_binary(
name = "program",
srcs = ["program.py"],
deps = [
"@pip_deps//requests:pkg",
],
)
filegroup(
name = "program_zip",
srcs = [":program"],
output_group = "python_zip_file",
)
genrule(
name = "program_zip_py_executable",
srcs = [":program_zip"],
outs = ["program_zip_py_executable.par"],
cmd = "echo '#!/usr/bin/env python3' | cat - $< >$@",
executable = True,
)
buildifier(
name = "buildifier",
exclude_patterns = [
"./.git/*",
],
)
buildifier(
name = "buildifier.check",
diff_command = "diff -q",
exclude_patterns = [
"./.git/*",
],
lint_mode = "warn",
lint_warnings = ["all"],
mode = "diff",
)
shellcheck_test(
name = "shellcheck",
data = glob(
["**/*.sh"],
exclude = ["bazel-*/**/*"],
),
)