Skip to content

Commit 9a7c5f5

Browse files
authored
Separate rules_score from python_basics (#157)
* Separate rules_score from python_basics Both tooling pieces are unrelated and sharing the pip hub is coupling them. * Fix sphinx toolchain
1 parent 22cb506 commit 9a7c5f5

4 files changed

Lines changed: 823 additions & 5 deletions

File tree

MODULE.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,15 @@ pip.parse(
160160
)
161161
use_repo(pip, "pip_lobster_bazel")
162162

163+
pip.parse(
164+
envsubst = ["PIP_INDEX_URL"],
165+
extra_pip_args = ["--index-url=${PIP_INDEX_URL:-https://pypi.org/simple/}"],
166+
hub_name = "pip_rules_score",
167+
python_version = PYTHON_VERSION,
168+
requirements_lock = "//bazel/rules/rules_score:requirements.txt",
169+
)
170+
use_repo(pip, "pip_rules_score")
171+
163172
###############################################################################
164173
# Multitool Hub (for ruff, pyright, actionlint, etc.)
165174
###############################################################################

bazel/rules/rules_score/BUILD

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14-
load("@aspect_rules_py//py:defs.bzl", "py_binary", "py_library")
15-
load(
16-
"@score_tooling//bazel/rules/rules_score:sphinx_toolchain.bzl",
17-
"sphinx_toolchain",
18-
)
14+
load("@pip_rules_score//:requirements.bzl", "requirement")
15+
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
1916
load(
2017
"//bazel/rules/rules_score:rules_score.bzl",
2118
"sphinx_module",
2219
)
20+
load("//bazel/rules/rules_score:sphinx_toolchain.bzl", "sphinx_toolchain")
2321

2422
exports_files([
2523
"templates/conf.template.py",
@@ -30,6 +28,15 @@ exports_files([
3028
"src/bazel_sphinx_needs.py",
3129
])
3230

31+
compile_pip_requirements(
32+
name = "requirements",
33+
src = "requirements.in",
34+
requirements_txt = "requirements.txt",
35+
tags = [
36+
"manual",
37+
],
38+
)
39+
3340
sphinx_module(
3441
name = "rules_score_doc",
3542
srcs = glob(
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
myst-parser
2+
readthedocs-sphinx-ext
3+
rst2pdf
4+
sphinx
5+
sphinx-needs
6+
sphinx-design
7+
sphinxcontrib-plantuml
8+
sphinxcontrib-umlet
9+
sphinx-rtd-theme
10+
svglib

0 commit comments

Comments
 (0)