From a28e87a32f790eda27936cd64268dfcc008e7099 Mon Sep 17 00:00:00 2001 From: David Fraser Date: Tue, 17 Mar 2015 14:30:14 +0000 Subject: [PATCH 1/3] Quote `fontname` as required by graphviz 2.36.0 --- sphinxtools/inheritance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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, From 144992dd9b33715221ea124a8c5338446b9454df Mon Sep 17 00:00:00 2001 From: David Fraser Date: Tue, 17 Mar 2015 14:59:49 +0000 Subject: [PATCH 2/3] Don't replace `double` with `float` if it's immediately followed by a word starting 'click' Otherwise we advise people about 'float clicking' and other difficult endeavours See http://trac.wxwidgets.org/ticket/16904 --- sphinxtools/utilities.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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: From e8cac2f291ef2c26accfb1eecb05e14d2bab8b51 Mon Sep 17 00:00:00 2001 From: David Fraser Date: Tue, 17 Mar 2015 15:14:39 +0000 Subject: [PATCH 3/3] Don't be content with having the correct MD5 - check that the package is executable (On Ubuntu 14.04.2 x86, the downloaded doxygen gives an `[ErrNo 8] Exec format error` here) --- build.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.py b/build.py index 8221be89..d6e44a05 100755 --- a/build.py +++ b/build.py @@ -488,6 +488,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...')