From bb10ffb49646453eea6f1f1fd43a6494254aa98f Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 19 Apr 2014 21:24:20 +0000 Subject: [PATCH] Create sphinx build dirs that don't already exist. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- etgtools/sphinx_generator.py | 5 ++++- sphinxtools/inheritance.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/etgtools/sphinx_generator.py b/etgtools/sphinx_generator.py index 4019f0bb..5b9dec90 100644 --- a/etgtools/sphinx_generator.py +++ b/etgtools/sphinx_generator.py @@ -1401,7 +1401,10 @@ class Snippet(Node): """ docstrings = '' - + + if not os.path.exists(os.path.dirname(self.cpp_file)): + os.makedirs(os.path.dirname(self.cpp_file)) + fid = open(self.cpp_file, 'wt') fid.write(self.snippet) fid.close() diff --git a/sphinxtools/inheritance.py b/sphinxtools/inheritance.py index a5fb9db0..b80654aa 100644 --- a/sphinxtools/inheritance.py +++ b/sphinxtools/inheritance.py @@ -237,6 +237,8 @@ class InheritanceDiagram(object): """ static_root = INHERITANCEROOT + if not os.path.exists(static_root): + os.makedirs(static_root) if self.main_class is not None: filename = self.main_class.name