Skip to content

Commit cae7394

Browse files
committed
Add sphing toolchain
1 parent 3815e8b commit cae7394

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

MODULE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module(
1818
version = "0.0.0",
1919
)
2020

21+
bazel_dep(name = "platforms", version = "1.0.0")
22+
2123
###############################################################################
2224
#
2325
# Python version

bazel/BUILD

Whitespace-only changes.

bazel/toolchains/BUILD

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
load(
2+
"@score_tooling//bazel/rules/rules_score:sphinx_toolchain.bzl",
3+
"sphinx_toolchain",
4+
)
5+
# ============================================================================
6+
# Toolchain for the score build
7+
# ============================================================================
8+
py_binary(
9+
name = "score_build",
10+
srcs = ["@score_tooling//bazel/rules/rules_score:src/sphinx_wrapper.py"],
11+
data = [],
12+
env = {
13+
"SOURCE_DIRECTORY": "",
14+
"DATA": "",
15+
"ACTION": "check",
16+
},
17+
main = "@score_tooling//bazel/rules/rules_score:src/sphinx_wrapper.py",
18+
visibility = ["//visibility:public"],
19+
deps = [
20+
"@score_docs_as_code//src:plantuml_for_python",
21+
"@score_docs_as_code//src/extensions/score_sphinx_bundle",
22+
"@score_tooling//bazel/rules/rules_score:sphinx_module_ext",
23+
],
24+
)
25+
26+
sphinx_toolchain(
27+
name = "score_sphinx_toolchain",
28+
conf_template = "template/conf.template.py",
29+
sphinx = ":score_build",
30+
)
31+
32+
toolchain(
33+
name = "score_toolchain",
34+
exec_compatible_with = [
35+
"@platforms//os:linux",
36+
"@platforms//cpu:x86_64",
37+
],
38+
target_compatible_with = [
39+
"@platforms//os:linux",
40+
"@platforms//cpu:x86_64",
41+
],
42+
toolchain = ":score_sphinx_toolchain",
43+
toolchain_type = "@score_tooling//bazel/rules/rules_score:toolchain_type",
44+
visibility = ["//visibility:public"],
45+
)

0 commit comments

Comments
 (0)