From 3a91ef8b9423fc17f7e94cf31db3ee3489f7b7fc Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 4 Oct 2016 23:41:29 +0200 Subject: [PATCH] [DEV] Update new lutin 2.2.0 (no legacy support) --- lutin_exml-sample.py | 16 ++++---- lutin_exml-test.py | 40 ++++++++++--------- lutin_exml.py | 93 ++++++++++++++++++++++---------------------- 3 files changed, 74 insertions(+), 75 deletions(-) diff --git a/lutin_exml-sample.py b/lutin_exml-sample.py index 0f13176..9fcaa78 100644 --- a/lutin_exml-sample.py +++ b/lutin_exml-sample.py @@ -1,7 +1,6 @@ #!/usr/bin/python -import lutin.module as module +import lutin.debug as debug import lutin.tools as tools -import datetime def get_type(): return "BINARY" @@ -24,17 +23,16 @@ def get_compagny_name(): def get_maintainer(): return "authors.txt" -def create(target, module_name): - my_module = module.Module(__file__, module_name, get_type()) +def configure(target, my_module): my_module.add_src_file([ - 'sample/main.cpp', - 'sample/read.cpp', - 'sample/write.cpp' - ]) + 'sample/main.cpp', + 'sample/read.cpp', + 'sample/write.cpp' + ]) my_module.add_depend([ 'exml', 'test-debug' ]) my_module.copy_path('sample/read.xml') - return my_module + return True diff --git a/lutin_exml-test.py b/lutin_exml-test.py index 010c5ad..601eda7 100644 --- a/lutin_exml-test.py +++ b/lutin_exml-test.py @@ -1,7 +1,6 @@ #!/usr/bin/python -import lutin.module as module +import lutin.debug as debug import lutin.tools as tools -import datetime def get_type(): @@ -28,22 +27,25 @@ def get_compagny_name(): def get_maintainer(): return "authors.txt" -def create(target, module_name): - my_module = module.Module(__file__, module_name, get_type()) +def configure(target, my_module): my_module.add_src_file([ - 'test/main.cpp', - 'test/exmlTestAll.cpp', - 'test/exmlTestComment.cpp', - 'test/exmlTestElement.cpp', - 'test/exmlTestAttribute.cpp', - 'test/exmlTestCommon.cpp', - 'test/exmlTestDeclaration.cpp', - 'test/exmlTestDeclarationXML.cpp', - 'test/exmlTestParseComment.cpp', - 'test/exmlTestParseElement.cpp', - 'test/exmlTestParseAttribute.cpp', - 'test/exmlTestParseDeclaration.cpp' - ]) - my_module.add_depend(['exml', 'gtest', 'test-debug']) - return my_module + 'test/main.cpp', + 'test/exmlTestAll.cpp', + 'test/exmlTestComment.cpp', + 'test/exmlTestElement.cpp', + 'test/exmlTestAttribute.cpp', + 'test/exmlTestCommon.cpp', + 'test/exmlTestDeclaration.cpp', + 'test/exmlTestDeclarationXML.cpp', + 'test/exmlTestParseComment.cpp', + 'test/exmlTestParseElement.cpp', + 'test/exmlTestParseAttribute.cpp', + 'test/exmlTestParseDeclaration.cpp' + ]) + my_module.add_depend([ + 'exml', + 'gtest', + 'test-debug' + ]) + return True diff --git a/lutin_exml.py b/lutin_exml.py index b0ffae9..16e5f3b 100644 --- a/lutin_exml.py +++ b/lutin_exml.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import lutin.module as module +import lutin.debug as debug import lutin.tools as tools @@ -24,56 +24,55 @@ def get_maintainer(): def get_version(): return "version.txt" -def create(target, module_name): - my_module = module.Module(__file__, module_name, get_type()) +def configure(target, my_module): my_module.add_depend(['elog', 'etk', 'ememory']) my_module.add_extra_flags() my_module.add_src_file([ - 'exml/debug.cpp', - 'exml/FilePos.cpp', - 'exml/nodeType.cpp', - 'exml/Attribute.cpp', - 'exml/AttributeList.cpp', - 'exml/Comment.cpp', - 'exml/Declaration.cpp', - 'exml/Document.cpp', - 'exml/Element.cpp', - 'exml/Node.cpp', - 'exml/Text.cpp', - ]) + 'exml/debug.cpp', + 'exml/FilePos.cpp', + 'exml/nodeType.cpp', + 'exml/Attribute.cpp', + 'exml/AttributeList.cpp', + 'exml/Comment.cpp', + 'exml/Declaration.cpp', + 'exml/Document.cpp', + 'exml/Element.cpp', + 'exml/Node.cpp', + 'exml/Text.cpp', + ]) my_module.add_src_file([ - 'exml/internal/Attribute.cpp', - 'exml/internal/AttributeList.cpp', - 'exml/internal/Comment.cpp', - 'exml/internal/Declaration.cpp', - 'exml/internal/Document.cpp', - 'exml/internal/Element.cpp', - 'exml/internal/Node.cpp', - 'exml/internal/Text.cpp' - ]) + 'exml/internal/Attribute.cpp', + 'exml/internal/AttributeList.cpp', + 'exml/internal/Comment.cpp', + 'exml/internal/Declaration.cpp', + 'exml/internal/Document.cpp', + 'exml/internal/Element.cpp', + 'exml/internal/Node.cpp', + 'exml/internal/Text.cpp' + ]) my_module.add_header_file([ - 'exml/FilePos.hpp', - 'exml/nodeType.hpp', - 'exml/exml.hpp', - 'exml/iterator.hpp', - 'exml/Attribute.hpp', - 'exml/AttributeList.hpp', - 'exml/Comment.hpp', - 'exml/Declaration.hpp', - 'exml/Document.hpp', - 'exml/Element.hpp', - 'exml/Node.hpp', - 'exml/Text.hpp', - 'exml/internal/Attribute.hpp', - 'exml/internal/AttributeList.hpp', - 'exml/internal/Comment.hpp', - 'exml/internal/Declaration.hpp', - 'exml/internal/Document.hpp', - 'exml/internal/Element.hpp', - 'exml/internal/Node.hpp', - 'exml/internal/Text.hpp' - ]) - my_module.add_path(tools.get_current_path(__file__)) - return my_module + 'exml/FilePos.hpp', + 'exml/nodeType.hpp', + 'exml/exml.hpp', + 'exml/iterator.hpp', + 'exml/Attribute.hpp', + 'exml/AttributeList.hpp', + 'exml/Comment.hpp', + 'exml/Declaration.hpp', + 'exml/Document.hpp', + 'exml/Element.hpp', + 'exml/Node.hpp', + 'exml/Text.hpp', + 'exml/internal/Attribute.hpp', + 'exml/internal/AttributeList.hpp', + 'exml/internal/Comment.hpp', + 'exml/internal/Declaration.hpp', + 'exml/internal/Document.hpp', + 'exml/internal/Element.hpp', + 'exml/internal/Node.hpp', + 'exml/internal/Text.hpp' + ]) + my_module.add_path(".") + return True