From a6517c9fa394ccf48206979f1e02608055de6a0c Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 3 Jan 2012 14:32:05 -0500 Subject: build: maybe towards a better way of getting Doxygen docstrings to build with -jN. --- docs/doxygen/Doxyfile.swig_doc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/doxygen/Doxyfile.swig_doc.in b/docs/doxygen/Doxyfile.swig_doc.in index 94e14bda1..54fdb492d 100644 --- a/docs/doxygen/Doxyfile.swig_doc.in +++ b/docs/doxygen/Doxyfile.swig_doc.in @@ -38,7 +38,7 @@ PROJECT_NUMBER = @CPACK_PACKAGE_VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@ +OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@/tmp # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output -- cgit From e3068517815363102043363556be654c5b47c5c9 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 3 Jan 2012 17:09:42 -0500 Subject: build: not going to work. Removing changes to cmake files and no sync call. --- docs/doxygen/Doxyfile.swig_doc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/doxygen/Doxyfile.swig_doc.in b/docs/doxygen/Doxyfile.swig_doc.in index 54fdb492d..94e14bda1 100644 --- a/docs/doxygen/Doxyfile.swig_doc.in +++ b/docs/doxygen/Doxyfile.swig_doc.in @@ -38,7 +38,7 @@ PROJECT_NUMBER = @CPACK_PACKAGE_VERSION@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@/tmp +OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output -- cgit From 0f3bb8be9d3eb2549de15c7192fcbeb57baf588d Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 3 Jan 2012 17:15:23 -0500 Subject: build: have swig_doc catch the exception when the xml parsing fails on a not-complete file. The method sleeps for a second and tries again 3 times before fully failing. This seems a bit crass... --- docs/doxygen/swig_doc.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index 5034099e3..7b34a523e 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -27,7 +27,7 @@ python docstrings. """ -import sys +import sys, time try: from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile, base @@ -193,7 +193,25 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): output.append(custom_output) # Create docstrings for the blocks. - blocks = di.in_category(Block) + tries = 0 + while(1): + try: + blocks = di.in_category(Block) + except: + if(tries < 3): + # May not be built just yet; sleep and try again + sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( + swigdocfilename)) + time.sleep(1) + tries += 1 + else: + # if we've given it three tries, give up and raise an error + sys.stderr.write("XML parsing error with file {0}. giving up.\n".format( + swigdocfilename)) + raise + else: + break + make_funcs = set([]) for block in blocks: try: -- cgit From 0aa47db21afc09b37ac4e0feebeaa624e5549714 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 6 Jan 2012 15:07:35 -0500 Subject: docs: another recheck point in the siwg_doc code. If a parse error happens, try rereading up to 3 times. --- docs/doxygen/swig_doc.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index 7b34a523e..95d143aab 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -219,7 +219,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): make_funcs.add(make_func.name()) output.append(make_block_entry(di, block)) except block.ParsingError: - print('Parsing error for block %s' % block.name()) + sys.stderr.write('Parsing error for block {0}'.format(block.name())) # Create docstrings for functions # Don't include the make functions since they have already been dealt with. @@ -228,7 +228,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): try: output.append(make_func_entry(f)) except f.ParsingError: - print('Parsing error for function %s' % f.name()) + sys.stderr.write('Parsing error for function {0}'.format(f.name())) # Create docstrings for classes block_names = [block.name() for block in blocks] @@ -237,7 +237,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): try: output.append(make_class_entry(k)) except k.ParsingError: - print('Parsing error for class %s' % k.name()) + sys.stderr.write('Parsing error for class {0}'.format(k.name())) # Docstrings are not created for anything that is not a function or a class. # If this excludes anything important please add it here. @@ -268,4 +268,24 @@ if __name__ == "__main__": custom_output = "\n\n".join(output) # Generate the docstrings interface file. - make_swig_interface_file(di, swigdocfilename, custom_output=custom_output) + # If parsing error on NoSuchMember, try again by rereading everything. + # Give up after 3 tries. + tries = 0 + while(1): + try: + make_swig_interface_file(di, swigdocfilename, custom_output=custom_output) + except base.Base.NoSuchMember: + if(tries < 3): + # May not be built just yet; sleep and try again + sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( + swigdocfilename)) + time.sleep(1) + tries += 1 + else: + # if we've given it three tries, give up and raise an error + sys.stderr.write("XML parsing error with file {0}. giving up.\n".format( + swigdocfilename)) + raise + else: + break + -- cgit From f58076ffbba790fd93504ea1d38e39e278e663de Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 16 Jan 2012 09:30:12 -0500 Subject: docs: another hack to check for errors and retry when building the swigdocs. --- docs/doxygen/swig_doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index 95d143aab..0148ba8fb 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -274,7 +274,7 @@ if __name__ == "__main__": while(1): try: make_swig_interface_file(di, swigdocfilename, custom_output=custom_output) - except base.Base.NoSuchMember: + except: if(tries < 3): # May not be built just yet; sleep and try again sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( -- cgit From 6e3ec5d3697274f45bb83e68818402e50c1e23a6 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 19 Jan 2012 22:14:31 -0500 Subject: docs: another try/except/rerun spot. --- docs/doxygen/swig_doc.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index 0148ba8fb..4148a546b 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -214,12 +214,28 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): make_funcs = set([]) for block in blocks: - try: - make_func = di.get_member(make_name(block.name()), DoxyFunction) - make_funcs.add(make_func.name()) - output.append(make_block_entry(di, block)) - except block.ParsingError: - sys.stderr.write('Parsing error for block {0}'.format(block.name())) + tries = 0 + while(1): + try: + make_func = di.get_member(make_name(block.name()), DoxyFunction) + make_funcs.add(make_func.name()) + output.append(make_block_entry(di, block)) + except block.ParsingError: + sys.stderr.write('Parsing error for block {0}'.format(block.name())) + except: + if(tries < 3): + # May not be built just yet; sleep and try again + sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( + swigdocfilename)) + time.sleep(1) + tries += 1 + else: + # if we've given it three tries, give up and raise an error + sys.stderr.write("XML parsing error with file {0}. giving up.\n".format( + swigdocfilename)) + raise + else: + break # Create docstrings for functions # Don't include the make functions since they have already been dealt with. -- cgit