Skip to content

Commit 3ed3d7b

Browse files
authored
Merge pull request #28695 from meeseeksmachine/auto-backport-of-pr-27797-on-v3.9.x
Backport PR #27797 on branch v3.9.x (DOC: Use video files for saving animations)
2 parents 81be26f + d88a582 commit 3ed3d7b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

doc/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ def _check_dependencies():
194194
subsectionorder as gallery_order_subsectionorder)
195195
from sphinxext.util import clear_basic_units, matplotlib_reduced_latex_scraper
196196

197+
if parse_version(sphinx_gallery.__version__) >= parse_version('0.17.0'):
198+
sg_matplotlib_animations = (True, 'mp4')
199+
else:
200+
sg_matplotlib_animations = True
201+
197202
# The following import is only necessary to monkey patch the signature later on
198203
from sphinx_gallery import gen_rst
199204

@@ -260,7 +265,7 @@ def _check_dependencies():
260265
'image_scrapers': (matplotlib_reduced_latex_scraper, ),
261266
'image_srcset': ["2x"],
262267
'junit': '../test-results/sphinx-gallery/junit.xml' if CIRCLECI else '',
263-
'matplotlib_animations': True,
268+
'matplotlib_animations': sg_matplotlib_animations,
264269
'min_reported_time': 1,
265270
'plot_gallery': 'True', # sphinx-gallery/913
266271
'reference_url': {'matplotlib': None, 'mpl_toolkits': None},

requirements/doc/doc-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pydata-sphinx-theme~=0.15.0
1818
mpl-sphinx-theme~=3.9.0
1919
pyyaml
2020
sphinxcontrib-svg2pdfconverter>=1.1.0
21+
sphinxcontrib-video>=0.2.1
2122
sphinx-copybutton
2223
sphinx-design
2324
sphinx-gallery>=0.12.0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy