blob: 764ecffa237726954d449fa6fe4c5970a5ab4689 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
diff --git a/src/sage_docbuild/ext/multidocs.py b/src/sage_docbuild/ext/multidocs.py
index f91c7753ca..edeb81ff2e 100644
--- a/src/sage_docbuild/ext/multidocs.py
+++ b/src/sage_docbuild/ext/multidocs.py
@@ -284,6 +284,16 @@ def init_subdoc(app):
if not app.config.multidoc_first_pass:
app.connect('env-updated', fetch_citation)
+ def fix_matplotlib_css_permissions(app: Sphinx, env):
+ css_file = os.path.join(app.builder.outdir, '_static', 'plot_directive.css')
+ try:
+ os.chmod(css_file, 0o644)
+ except:
+ pass
+
+ # executed after matplotlib's _copy_css_file
+ app.connect('build-finished', fix_matplotlib_css_permissions, priority=600)
+
# Monkey patch copy_static_files to make a symlink to "../"
def link_static_files():
"""
|