From 5e53232f0cda2ff35f74af84c3ababe835fb7cb4 Mon Sep 17 00:00:00 2001 From: Build System Date: Sun, 22 Sep 2013 02:34:15 +0400 Subject: [PATCH] Fixes typo in doxygen-python, and fixes unitest TestCase().discover on python < 2.7 --- pcbnew/CMakeLists.txt | 2 +- pcbnew/Doxyfile_python | 10 +++++----- pcbnew/scripting/qa/test.py | 5 +++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 97e5ee85a8..5c9acfbe30 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -394,7 +394,7 @@ if( DOXYGEN_FOUND ) ${CMAKE_COMMAND} -E remove_directory doxygen-python COMMAND PYTHON_SOURCES_TO_DOC=${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile_python WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS Doxyfile.python + DEPENDS Doxyfile_python DEPENDS xml-to-docstrings DEPENDS pcbnew.py diff --git a/pcbnew/Doxyfile_python b/pcbnew/Doxyfile_python index 7396b40402..5093cf0172 100644 --- a/pcbnew/Doxyfile_python +++ b/pcbnew/Doxyfile_python @@ -396,7 +396,7 @@ LOOKUP_CACHE_SIZE = 0 # normally produced when WARNINGS is set to YES. # The default value is: NO. -EXTRACT_ALL = NO +EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class will # be included in the documentation. @@ -408,7 +408,7 @@ EXTRACT_PRIVATE = NO # scope will be included in the documentation. # The default value is: NO. -EXTRACT_PACKAGE = NO +EXTRACT_PACKAGE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file will be # included in the documentation. @@ -430,7 +430,7 @@ EXTRACT_LOCAL_CLASSES = YES # included. # The default value is: NO. -EXTRACT_LOCAL_METHODS = NO +EXTRACT_LOCAL_METHODS = YES # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called @@ -455,7 +455,7 @@ HIDE_UNDOC_MEMBERS = NO # no effect if EXTRACT_ALL is enabled. # The default value is: NO. -HIDE_UNDOC_CLASSES = NO +HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO these declarations will be @@ -796,7 +796,7 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = _object,SwigPyIterator # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include diff --git a/pcbnew/scripting/qa/test.py b/pcbnew/scripting/qa/test.py index 987a31cc72..3a25976140 100644 --- a/pcbnew/scripting/qa/test.py +++ b/pcbnew/scripting/qa/test.py @@ -1,5 +1,10 @@ import unittest +import platform +if platform.python_version() < '2.7': + unittest = __import__('unittest2') +else: + import unittest if __name__ == '__main__': testsuite = unittest.TestLoader().discover('testcases',pattern="*.py")