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 c8b4db8

Browse filesBrowse files
NelleVdstansby
authored andcommitted
Merge pull request matplotlib#8221 from afvincent/doc_early_check_for_dot
Early check for dot binary (from graphviz) when building the doc (fixes matplotlib#8207)
1 parent 932d469 commit c8b4db8
Copy full SHA for c8b4db8

File tree

Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import os
1515
import sys
1616
import sphinx
17+
import six
1718

1819
# If your extensions are in another directory, add it here. If the directory
1920
# is relative to the documentation root, use os.path.abspath to make it
@@ -67,6 +68,23 @@
6768
raise ImportError("No module named mock - you need to install "
6869
"mock to build the documentation")
6970

71+
try:
72+
from PIL import Image
73+
except ImportError:
74+
raise ImportError("No module named Image - you need to install "
75+
"pillow to build the documentation")
76+
77+
if six.PY2:
78+
from distutils.spawn import find_executable
79+
has_dot = find_executable('dot') is not None
80+
else:
81+
from shutil import which # Python >= 3.3
82+
has_dot = which('dot') is not None
83+
if not has_dot:
84+
raise OSError(
85+
"No binary named dot - you need to install the Graph Visualization "
86+
"software (usually packaged as 'graphviz') to build the documentation")
87+
7088
try:
7189
import matplotlib
7290
except ImportError:

0 commit comments

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