Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a62d744

Browse files
committedJan 20, 2025·
lint
1 parent 73a5b04 commit a62d744

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎build_docs.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,14 +786,17 @@ def build_venv(self):
786786
So we can reuse them from builds to builds, while they contain
787787
different Sphinx versions.
788788
"""
789+
requirements = [self.theme] + self.version.requirements
790+
if self.includes_html:
791+
# opengraph previews
792+
requirements.append("matplotlib>=3")
793+
789794
venv_path = self.build_root / ("venv-" + self.version.name)
790795
run([sys.executable, "-m", "venv", venv_path])
791796
run(
792797
[venv_path / "bin" / "python", "-m", "pip", "install", "--upgrade"]
793798
+ ["--upgrade-strategy=eager"]
794-
+ [self.theme]
795-
+ ["matplotlib>=3"] if self.includes_html else [] # opengraph previews
796-
+ self.version.requirements,
799+
+ requirements,
797800
cwd=self.checkout / "Doc",
798801
)
799802
run([venv_path / "bin" / "python", "-m", "pip", "freeze", "--all"])

0 commit comments

Comments
 (0)
Please sign in to comment.