Skip to content
Permalink
Browse files

update dependencies, avoid raising an exception

  • Loading branch information...
sdpython committed Apr 17, 2016
1 parent 805ec46 commit 267c5c99c334f64a8d44754e9e9141dd1f60225d
@@ -19,6 +19,7 @@ cloud-sptheme
codecov
coverage
docutils
entrypoints
hachibee-sphinx-theme
ipykernel
ipyparallel
@@ -209,6 +209,7 @@ def write_version():
"autopep8", # part of the minimal list
"babel!=2.0", # babel 2.0 has issue
"docutils",
"entrypoints",
"numpy",
"IPython",
"ipykernel",
@@ -221,8 +222,9 @@ def write_version():
"matplotlib",
"metakernel",
"multi_key_dict",
"nbconvert>=4.2.0",
"nbformat",
"notebook",
"notebook>=4.2.0",
"path.py",
"pickleshare",
"pandas",
@@ -114,9 +114,12 @@ def find_pandoc_path():
return ""


def get_graphviz_dot():
def get_graphviz_dot(exc=True):
"""
finds Graphviz executable dot, does something specific for Windows
@param exc returns an exception or None if it was not found
@return path
"""
if sys.platform.startswith("win"):
# appveyor
@@ -133,7 +136,10 @@ def get_graphviz_dot():

if sys.platform.startswith("win"):
if not os.path.exists(graphviz_dot):
raise FileNotFoundError(graphviz_dot)
if exc:
raise FileNotFoundError(graphviz_dot)
else:
return None
else:
graphviz_dot = "dot"
return graphviz_dot
@@ -73,7 +73,7 @@ def default_sphinx_options(fLOG=noLOG, **options):
'math_number_all': options.get('math_number_all', False),
# graphviz
'graphviz_output_format': options.get('graphviz_output_format', 'png'),
'graphviz_dot': options.get('graphviz_dot', get_graphviz_dot()),
'graphviz_dot': options.get('graphviz_dot', get_graphviz_dot(False)),
# latex
'imgmath_image_format': options.get('imgmath_image_format', 'png'),
# containers
@@ -359,10 +359,10 @@ def _sversion():
set current=%~dp0
set path=%path%;%pythonexe%;%pythonexe%\\Scripts
@echo ~SET path=%path%;%pythonexe%;%pythonexe%\\Scripts
@echo ~CALL jupyter-notebook --notebook-dir=_doc\\notebooks --matplotlib=inline
@echo ~CALL jupyter-notebook --notebook-dir=_doc\\notebooks
set PYTHONPATH=%PYTHONPATH%;%current%\\src__ADDITIONAL_LOCAL_PATH__
@echo ~SET PYTHONPATH=%PYTHONPATH%;%current%\\src__ADDITIONAL_LOCAL_PATH__
jupyter-notebook --notebook-dir=_doc\\notebooks --matplotlib=inline
jupyter-notebook --notebook-dir=_doc\\notebooks
""".replace("PY??", _sversion())

#################

0 comments on commit 267c5c9

Please sign in to comment.
You can’t perform that action at this time.