From 71e9a15ccfcd654722fc4290a8dc4493b94113d8 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Wed, 5 Aug 2020 20:05:49 +0100 Subject: [PATCH] Don't copy graphviz.css when building man pages _static/graphviz.css is being created alongside the man pages. --- sphinx/ext/graphviz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 4a8dd0a4d..d97a7505e 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -385,7 +385,7 @@ def man_visit_graphviz(self: ManualPageTranslator, node: graphviz) -> None: def on_build_finished(app: Sphinx, exc: Exception) -> None: - if exc is None: + if exc is None and app.builder.format == 'html': src = path.join(sphinx.package_dir, 'templates', 'graphviz', 'graphviz.css') dst = path.join(app.outdir, '_static') copy_asset(src, dst)