Skip to content

Commit

Permalink
fixup: buildify
Browse files Browse the repository at this point in the history
  • Loading branch information
matzf committed Apr 11, 2024
1 parent 540048c commit 9d34623
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions doc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ compile_pip_requirements(
# Run with all packages from requirements.txt so we don't have to explicitly repeat the required modules.
py_console_script_binary(
name = "sphinx-build",
pkg = requirement("sphinx"), # note: "requirement" is just a shorthand for the :pkg label referencing the py_library
pkg = requirement("sphinx"), # note: "requirement" is just a shorthand for the :pkg label referencing the py_library
script = "sphinx-build",
deps = [r for r in all_requirements if r != requirement("sphinx")], # macro adds "pkg" to deps, filter it out to avoid duplicate value in attribute
deps = [r for r in all_requirements if r != requirement("sphinx")], # macro adds "pkg" to deps, filter it out to avoid duplicate value in attribute
)

# sphinx-autobuild: just like above
py_console_script_binary(
name = "sphinx-autobuild",
pkg = requirement("sphinx-autobuild"),
script = "sphinx-autobuild",
deps = [r for r in all_requirements if r != requirement("sphinx-autobuild")]
deps = [r for r in all_requirements if r != requirement("sphinx-autobuild")],
)

# sphinx-lint
Expand All @@ -44,7 +44,15 @@ alias(

sphinx_lint_test(
name = "sphinx_lint_test",
args = ["--enable", "all", "--disable", "line-too-long"],
srcs = glob(['**/*.rst', '**/*.md']),
srcs = glob([
"**/*.rst",
"**/*.md",
]),
args = [
"--enable",
"all",
"--disable",
"line-too-long",
],
tags = ["lint"],
)
4 changes: 2 additions & 2 deletions doc/lint.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _sphinx_lint_test_impl(ctx):
deps = ctx.attr._sphinx_lint_cli.default_runfiles.files.to_list()

runfiles = ctx.runfiles(
files = ctx.files.srcs + deps
files = ctx.files.srcs + deps,
)
return [
DefaultInfo(
Expand All @@ -35,7 +35,7 @@ sphinx_lint_test = rule(
cfg = "host",
default = "//doc:sphinx-lint",
executable = True,
)
),
},
test = True,
)

0 comments on commit 9d34623

Please sign in to comment.