diff --git a/build.py b/build.py index 2763c3c1..ca6355a6 100755 --- a/build.py +++ b/build.py @@ -497,6 +497,13 @@ def getTool(cmdName, version, MD5, envVar, platformBinary): print(' expected "%s"' % md5) print(' Set %s in the environment to use a local build of %s instead' % (envVar, cmdName)) sys.exit(1) + try: + p = subprocess.Popen([cmd, '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ) + p.wait() + except OSError, e: + print('ERROR: Could not execute %s, got "%s"' % (cmd, e)) + print(' Set %s in the environment to use a local build of %s instead' % (envVar, cmdName)) + sys.exit(1) return cmd msg('Not found. Attempting to download...') diff --git a/sphinxtools/inheritance.py b/sphinxtools/inheritance.py index 7b26dfa4..b1dc5318 100644 --- a/sphinxtools/inheritance.py +++ b/sphinxtools/inheritance.py @@ -116,8 +116,8 @@ class InheritanceDiagram(object): 'shape': 'box', 'fontsize': 10, 'height': 0.3, - 'fontname': 'Vera Sans, DejaVu Sans, Liberation Sans, ' - 'Arial, Helvetica, sans', + 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, ' + 'Arial, Helvetica, sans"', 'style': '"setlinewidth(0.5)"', } default_edge_attrs = { @@ -144,8 +144,8 @@ class InheritanceDiagram(object): inheritance_graph_attrs = dict(fontsize=9, ratio='auto', size='""', rankdir="TB") inheritance_node_attrs = {"align": "center", 'shape': 'box', 'fontsize': 10, 'height': 0.3, - 'fontname': 'Vera Sans, DejaVu Sans, Liberation Sans, ' - 'Arial, Helvetica, sans', 'style': '"setlinewidth(0.5)"', + 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, ' + 'Arial, Helvetica, sans"', 'style': '"setlinewidth(0.5)"', 'labelloc': 'c', 'fontcolor': 'grey45'} inheritance_edge_attrs = {'arrowsize': 0.5, diff --git a/sphinxtools/utilities.py b/sphinxtools/utilities.py index 9ab3c934..9f3afac1 100644 --- a/sphinxtools/utilities.py +++ b/sphinxtools/utilities.py @@ -198,9 +198,10 @@ def ReplaceCppItems(line): :rtype: `string` """ + items = RE_KEEP_SPACES.split(line) newstr = [] - for item in RE_KEEP_SPACES.split(line): + for n, item in enumerate(items): if item in CPP_ITEMS: continue @@ -210,7 +211,8 @@ def ReplaceCppItems(line): elif item == 'char': item = 'int' elif item == 'double': - item = 'float' + if len(items) > n+2 and not items[n+2].lower().startswith("click"): + item = 'float' if len(item.replace('``', '')) > 2: if '*' in item: