[DEV] rework

This commit is contained in:
Edouard DUPIN 2019-09-23 15:28:50 +02:00 committed by Edouard DUPIN
parent 47f6f00480
commit 6746ff41bb
187 changed files with 154 additions and 395 deletions

2
MANIFEST.in Normal file
View File

@ -0,0 +1,2 @@
include README.rst
include bash-autocompletion/lutin

11
bin/monk Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
## @author Edouard DUPIN
##
## @copyright 2012, Edouard DUPIN, all right reserved
##
## @license MPL v2.0 (see license file)
##
import monk

View File

@ -4,33 +4,33 @@ import sys
import os import os
import inspect import inspect
import fnmatch import fnmatch
import monkDebug as debug from . import module
import monkModule from . import tools
import monkArg import death.Arguments as arguments
import monkTools import death.ArgElement as arg_element
from realog import debug
my_args = arguments.Arguments()
my_args.add("h", "help", desc="display this help"))
my_args.add_section("option", "Can be set one time in all case")
my_args.add("v", "verbose", list=[["0","None"],["1","error"],["2","warning"],["3","info"],["4","debug"],["5","verbose"]], desc="Display makefile debug level (verbose) default =2"))
my_args.add("C", "color", desc="Display makefile output in color"))
myArg = monkArg.MonkArg() my_args.add_section("cible", "generate in order set")
myArg.add(monkArg.ArgDefine("h", "help", desc="display this help")) local_argument = my_args.parse()
myArg.add_section("option", "Can be set one time in all case")
myArg.add(monkArg.ArgDefine("v", "verbose", list=[["0","None"],["1","error"],["2","warning"],["3","info"],["4","debug"],["5","verbose"]], desc="Display makefile debug level (verbose) default =2"))
myArg.add(monkArg.ArgDefine("C", "color", desc="Display makefile output in color"))
myArg.add_section("cible", "generate in order set")
localArgument = myArg.parse()
## ##
## @brief Display the help of this makefile ## @brief Display the help of this makefile
## ##
def usage(): def usage():
# generic argument displayed : # generic argument displayed :
myArg.display() my_args.display()
print(" all") print(" all")
print(" Build all (only for the current selected board) (bynary and packages)") print(" Build all (only for the current selected board) (bynary and packages)")
print(" clean") print(" clean")
print(" Clean all (same as previous)") print(" Clean all (same as previous)")
listOfAllModule = monkModule.list_all_module_with_desc() listOfAllModule = module.list_all_module_with_desc()
for mod in listOfAllModule: for mod in listOfAllModule:
print(" " + mod[0] + " / " + mod[0] + "-clean") print(" " + mod[0] + " / " + mod[0] + "-clean")
if mod[1] != "": if mod[1] != "":
@ -61,7 +61,7 @@ def parse_generic_arg(argument,active):
## @brief Parse default unique argument: ## @brief Parse default unique argument:
## ##
if __name__ == "__main__": if __name__ == "__main__":
for argument in localArgument: for argument in local_argument:
parse_generic_arg(argument, True) parse_generic_arg(argument, True)
## ##
@ -70,21 +70,21 @@ if __name__ == "__main__":
def start(): def start():
actionDone=False actionDone=False
# parse all argument # parse all argument
for argument in localArgument: for argument in local_argument:
if parse_generic_arg(argument, False) == True: if parse_generic_arg(argument, False) == True:
continue continue
if argument.get_option_name() != "": if argument.get_option_name() != "":
debug.warning("Can not understand argument : '" + argument.get_option_name() + "'") debug.warning("Can not understand argument : '" + argument.get_option_name() + "'")
usage() usage()
else: else:
module = monkModule.get_module(argument.get_arg()) module = module.get_module(argument.get_arg())
module.parse_code() module.parse_code()
module.generate() module.generate()
actionDone=True actionDone=True
# if no action done : we do "all" ... # if no action done : we do "all" ...
if actionDone==False: if actionDone==False:
#Must generate all docs : #Must generate all docs :
moduleElements = monkModule.get_all_module() moduleElements = module.get_all_module()
for module in moduleElements: for module in moduleElements:
module.parse_code() module.parse_code()
for module in moduleElements: for module in moduleElements:
@ -94,7 +94,7 @@ def start():
## @brief When the user use with make.py we initialise ourself ## @brief When the user use with make.py we initialise ourself
## ##
if __name__ == '__main__': if __name__ == '__main__':
sys.path.append(monkTools.get_run_folder()) sys.path.append(tools.get_run_folder())
# Import all sub path without out and archive # Import all sub path without out and archive
for folder in os.listdir("."): for folder in os.listdir("."):
if os.path.isdir(folder)==True: if os.path.isdir(folder)==True:
@ -102,7 +102,7 @@ if __name__ == '__main__':
and folder.lower()!="archive" \ and folder.lower()!="archive" \
and folder.lower()!="out" : and folder.lower()!="out" :
debug.debug("Automatic load path: '" + folder + "'") debug.debug("Automatic load path: '" + folder + "'")
monkModule.import_path(folder) module.import_path(folder)
start() start()

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import codeHL import codeHL

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import codeHLcpp import codeHLcpp

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import codeHL import codeHL

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools import monkTools
import re import re

View File

@ -3,7 +3,7 @@ import sys
import os import os
import inspect import inspect
import fnmatch import fnmatch
import monkDebug as debug from realog import debug
import monkTools as tools import monkTools as tools
import monkNode as Node import monkNode as Node
import monkParse as Parse import monkParse as Parse

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
import monkModule as module import monkModule as module

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
class Enum(Node.Node): class Enum(Node.Node):

View File

@ -1,7 +1,7 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import sys import sys
import monkTools as tools from . import tools
#import CppHeaderParser #import CppHeaderParser
import os import os
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import os import os
import sys import sys
import re import re

View File

@ -1,5 +1,5 @@
##!/usr/bin/python ##!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
import monkType as Type import monkType as Type
import monkVariable as Variable import monkVariable as Variable

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
class Namespace(Node.Node): class Namespace(Node.Node):

View File

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkModule as module from . import module
access_list = ['private', 'protected', 'public'] access_list = ['private', 'protected', 'public']

View File

@ -4,7 +4,7 @@ import sys
import re import re
import copy import copy
import monkTools as tools from . import tools
sys.path.append(tools.get_current_path(__file__) + "/ply/ply/") sys.path.append(tools.get_current_path(__file__) + "/ply/ply/")
sys.path.append(tools.get_current_path(__file__) + "/codeBB/") sys.path.append(tools.get_current_path(__file__) + "/codeBB/")
@ -14,7 +14,7 @@ sys.path.append(tools.get_current_path(__file__) + "/codeHL/")
import lex import lex
import inspect import inspect
import monkDebug as debug from realog import debug
import monkClass as Class import monkClass as Class
import monkNamespace as Namespace import monkNamespace as Namespace
import monkStruct as Struct import monkStruct as Struct

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
class Struct(Node.Node): class Struct(Node.Node):

View File

@ -1,8 +1,8 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkType as Type import monkType as Type
import monkNode as node import monkNode as node
import monkModule as module from . import module
import re import re

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
class Typedef(Node.Node): class Typedef(Node.Node):

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
class Union(Node.Node): class Union(Node.Node):

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkNode as Node import monkNode as Node
import monkType as Type import monkType as Type

View File

@ -1,5 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import monkDebug as debug from realog import debug
import monkType as Type import monkType as Type
import monkNode as Node import monkNode as Node

Some files were not shown because too many files have changed in this diff Show More