Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a58725

Browse filesBrowse files
committed
Don't emit a non-GUI warning when building the docs on Linux.
... and move the check for graphviz into the _check_dependencies() helper function, where it logically belongs to.
1 parent 2660901 commit 1a58725
Copy full SHA for 1a58725

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def _check_dependencies():
7272
raise ImportError(
7373
"The following dependencies are missing to build the "
7474
"documentation: {}".format(", ".join(missing)))
75+
if shutil.which('dot') is None:
76+
raise OSError(
77+
"No binary named dot - graphviz must be installed to build the "
78+
"documentation")
7579

7680
_check_dependencies()
7781

@@ -83,10 +87,8 @@ def _check_dependencies():
8387
# The following import is only necessary to monkey patch the signature later on
8488
from sphinx_gallery import gen_rst
8589

86-
if shutil.which('dot') is None:
87-
raise OSError(
88-
"No binary named dot - you need to install the Graph Visualization "
89-
"software (usually packaged as 'graphviz') to build the documentation")
90+
# On Linux, prevent plt.show() from emitting a non-GUI backend warning.
91+
os.environ.pop("DISPLAY", None)
9092

9193
autosummary_generate = True
9294

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.