Skip to content

Commit 9880b85

Browse files
committed
only build changes.rst when parsing changelog
1 parent 21502ba commit 9880b85

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

tooling/src/hypothesistooling/projects/hypothesispython.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,21 @@ def has_source_changes():
6565
return tools.has_changes([PYTHON_SRC])
6666

6767

68-
def build_docs(builder="html"):
68+
def build_docs(*, builder="html", only=[]):
6969
# See https://www.sphinx-doc.org/en/stable/man/sphinx-build.html
7070
# (unfortunately most options only have the short flag version)
7171
tools.scripts.pip_tool(
72-
"sphinx-build",
73-
"-W",
74-
"--keep-going",
75-
"-T",
76-
"-E",
77-
"-b",
78-
builder,
79-
"docs",
80-
"docs/_build/" + builder,
72+
*[
73+
"sphinx-build",
74+
"-W",
75+
"-T",
76+
"-E",
77+
"-b",
78+
builder,
79+
"docs",
80+
"docs/_build/" + builder,
81+
*only,
82+
],
8183
cwd=HYPOTHESIS_PYTHON,
8284
)
8385

@@ -189,7 +191,7 @@ def upload_distribution():
189191

190192
# Construct plain-text + markdown version of this changelog entry,
191193
# with link to canonical source.
192-
build_docs(builder="text")
194+
build_docs(builder="text", only=["docs/changes.rst"])
193195
textfile = os.path.join(HYPOTHESIS_PYTHON, "docs", "_build", "text", "changes.txt")
194196
with open(textfile, encoding="utf-8") as f:
195197
lines = f.readlines()

0 commit comments

Comments
 (0)