diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f092607 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include README.rst +include bash-autocompletion/lutin diff --git a/bin/monk b/bin/monk new file mode 100755 index 0000000..491882a --- /dev/null +++ b/bin/monk @@ -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 diff --git a/monk.py b/monk/__init__.py similarity index 69% rename from monk.py rename to monk/__init__.py index 1e1126d..e5fe9ca 100755 --- a/monk.py +++ b/monk/__init__.py @@ -4,33 +4,33 @@ import sys import os import inspect import fnmatch -import monkDebug as debug -import monkModule -import monkArg -import monkTools +from . import module +from . import tools +import death.Arguments as arguments +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() -myArg.add(monkArg.ArgDefine("h", "help", desc="display this help")) -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() +my_args.add_section("cible", "generate in order set") +local_argument = my_args.parse() ## ## @brief Display the help of this makefile ## def usage(): # generic argument displayed : - myArg.display() + my_args.display() print(" all") print(" Build all (only for the current selected board) (bynary and packages)") print(" clean") print(" Clean all (same as previous)") - listOfAllModule = monkModule.list_all_module_with_desc() + listOfAllModule = module.list_all_module_with_desc() for mod in listOfAllModule: print(" " + mod[0] + " / " + mod[0] + "-clean") if mod[1] != "": @@ -61,7 +61,7 @@ def parse_generic_arg(argument,active): ## @brief Parse default unique argument: ## if __name__ == "__main__": - for argument in localArgument: + for argument in local_argument: parse_generic_arg(argument, True) ## @@ -70,21 +70,21 @@ if __name__ == "__main__": def start(): actionDone=False # parse all argument - for argument in localArgument: + for argument in local_argument: if parse_generic_arg(argument, False) == True: continue if argument.get_option_name() != "": debug.warning("Can not understand argument : '" + argument.get_option_name() + "'") usage() else: - module = monkModule.get_module(argument.get_arg()) + module = module.get_module(argument.get_arg()) module.parse_code() module.generate() actionDone=True # if no action done : we do "all" ... if actionDone==False: #Must generate all docs : - moduleElements = monkModule.get_all_module() + moduleElements = module.get_all_module() for module in moduleElements: module.parse_code() for module in moduleElements: @@ -94,7 +94,7 @@ def start(): ## @brief When the user use with make.py we initialise ourself ## 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 for folder in os.listdir("."): if os.path.isdir(folder)==True: @@ -102,7 +102,7 @@ if __name__ == '__main__': and folder.lower()!="archive" \ and folder.lower()!="out" : debug.debug("Automatic load path: '" + folder + "'") - monkModule.import_path(folder) + module.import_path(folder) start() diff --git a/codeBB/BB_Code.py b/monk/codeBB/BB_Code.py similarity index 97% rename from codeBB/BB_Code.py rename to monk/codeBB/BB_Code.py index 216bed1..9a0100c 100644 --- a/codeBB/BB_Code.py +++ b/monk/codeBB/BB_Code.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import codeHL diff --git a/codeBB/BB_Image.py b/monk/codeBB/BB_Image.py similarity index 92% rename from codeBB/BB_Image.py rename to monk/codeBB/BB_Image.py index 443eaee..344ade6 100644 --- a/codeBB/BB_Image.py +++ b/monk/codeBB/BB_Image.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_IndentAndDot.py b/monk/codeBB/BB_IndentAndDot.py similarity index 98% rename from codeBB/BB_IndentAndDot.py rename to monk/codeBB/BB_IndentAndDot.py index 9f3e657..f5acdbf 100644 --- a/codeBB/BB_IndentAndDot.py +++ b/monk/codeBB/BB_IndentAndDot.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_Link.py b/monk/codeBB/BB_Link.py similarity index 98% rename from codeBB/BB_Link.py rename to monk/codeBB/BB_Link.py index f7116ca..5d9faab 100644 --- a/codeBB/BB_Link.py +++ b/monk/codeBB/BB_Link.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_Specification.py b/monk/codeBB/BB_Specification.py similarity index 89% rename from codeBB/BB_Specification.py rename to monk/codeBB/BB_Specification.py index c487373..8c38845 100644 --- a/codeBB/BB_Specification.py +++ b/monk/codeBB/BB_Specification.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_Table.py b/monk/codeBB/BB_Table.py similarity index 97% rename from codeBB/BB_Table.py rename to monk/codeBB/BB_Table.py index c4a629d..2144253 100644 --- a/codeBB/BB_Table.py +++ b/monk/codeBB/BB_Table.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_Text.py b/monk/codeBB/BB_Text.py similarity index 99% rename from codeBB/BB_Text.py rename to monk/codeBB/BB_Text.py index 06f320b..9a1d672 100644 --- a/codeBB/BB_Text.py +++ b/monk/codeBB/BB_Text.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_Title.py b/monk/codeBB/BB_Title.py similarity index 97% rename from codeBB/BB_Title.py rename to monk/codeBB/BB_Title.py index 5db2923..b612c2d 100644 --- a/codeBB/BB_Title.py +++ b/monk/codeBB/BB_Title.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_comment.py b/monk/codeBB/BB_comment.py similarity index 94% rename from codeBB/BB_comment.py rename to monk/codeBB/BB_comment.py index 68d41e7..0dda159 100644 --- a/codeBB/BB_comment.py +++ b/monk/codeBB/BB_comment.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/BB_lineReturn.py b/monk/codeBB/BB_lineReturn.py similarity index 94% rename from codeBB/BB_lineReturn.py rename to monk/codeBB/BB_lineReturn.py index 9c372f3..64a94d8 100644 --- a/codeBB/BB_lineReturn.py +++ b/monk/codeBB/BB_lineReturn.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeBB/codeBB.py b/monk/codeBB/codeBB.py similarity index 97% rename from codeBB/codeBB.py rename to monk/codeBB/codeBB.py index 4fff004..0802d8f 100644 --- a/codeBB/codeBB.py +++ b/monk/codeBB/codeBB.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHL.py b/monk/codeHL/codeHL.py similarity index 96% rename from codeHL/codeHL.py rename to monk/codeHL/codeHL.py index 773c0d0..de23e87 100644 --- a/codeHL/codeHL.py +++ b/monk/codeHL/codeHL.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import codeHLcpp diff --git a/codeHL/codeHLBBcode.py b/monk/codeHL/codeHLBBcode.py similarity index 78% rename from codeHL/codeHLBBcode.py rename to monk/codeHL/codeHLBBcode.py index 6c8487b..12e7b32 100644 --- a/codeHL/codeHLBBcode.py +++ b/monk/codeHL/codeHLBBcode.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHLJava.py b/monk/codeHL/codeHLJava.py similarity index 78% rename from codeHL/codeHLJava.py rename to monk/codeHL/codeHLJava.py index 6c8487b..12e7b32 100644 --- a/codeHL/codeHLJava.py +++ b/monk/codeHL/codeHLJava.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHLPython.py b/monk/codeHL/codeHLPython.py similarity index 78% rename from codeHL/codeHLPython.py rename to monk/codeHL/codeHLPython.py index 6c8487b..12e7b32 100644 --- a/codeHL/codeHLPython.py +++ b/monk/codeHL/codeHLPython.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHLXML.py b/monk/codeHL/codeHLXML.py similarity index 97% rename from codeHL/codeHLXML.py rename to monk/codeHL/codeHLXML.py index 263742f..4411211 100644 --- a/codeHL/codeHLXML.py +++ b/monk/codeHL/codeHLXML.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHLcpp.py b/monk/codeHL/codeHLcpp.py similarity index 98% rename from codeHL/codeHLcpp.py rename to monk/codeHL/codeHLcpp.py index 8952961..54b95dd 100644 --- a/codeHL/codeHLcpp.py +++ b/monk/codeHL/codeHLcpp.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHLjson.py b/monk/codeHL/codeHLjson.py similarity index 78% rename from codeHL/codeHLjson.py rename to monk/codeHL/codeHLjson.py index 8c17575..3210137 100644 --- a/codeHL/codeHLjson.py +++ b/monk/codeHL/codeHLjson.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeHL/codeHLshell.py b/monk/codeHL/codeHLshell.py similarity index 90% rename from codeHL/codeHLshell.py rename to monk/codeHL/codeHLshell.py index 24d06bc..6831448 100644 --- a/codeHL/codeHLshell.py +++ b/monk/codeHL/codeHLshell.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_Code.py b/monk/codeMarkDown/MD_Code.py similarity index 98% rename from codeMarkDown/MD_Code.py rename to monk/codeMarkDown/MD_Code.py index 7c9556a..7c4ebf8 100644 --- a/codeMarkDown/MD_Code.py +++ b/monk/codeMarkDown/MD_Code.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import codeHL diff --git a/codeMarkDown/MD_Image.py b/monk/codeMarkDown/MD_Image.py similarity index 92% rename from codeMarkDown/MD_Image.py rename to monk/codeMarkDown/MD_Image.py index 443eaee..344ade6 100644 --- a/codeMarkDown/MD_Image.py +++ b/monk/codeMarkDown/MD_Image.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_IndentAndDot.py b/monk/codeMarkDown/MD_IndentAndDot.py similarity index 97% rename from codeMarkDown/MD_IndentAndDot.py rename to monk/codeMarkDown/MD_IndentAndDot.py index e02f873..7865960 100644 --- a/codeMarkDown/MD_IndentAndDot.py +++ b/monk/codeMarkDown/MD_IndentAndDot.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_Link.py b/monk/codeMarkDown/MD_Link.py similarity index 98% rename from codeMarkDown/MD_Link.py rename to monk/codeMarkDown/MD_Link.py index f7116ca..5d9faab 100644 --- a/codeMarkDown/MD_Link.py +++ b/monk/codeMarkDown/MD_Link.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_Specification.py b/monk/codeMarkDown/MD_Specification.py similarity index 89% rename from codeMarkDown/MD_Specification.py rename to monk/codeMarkDown/MD_Specification.py index c487373..8c38845 100644 --- a/codeMarkDown/MD_Specification.py +++ b/monk/codeMarkDown/MD_Specification.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_Table.py b/monk/codeMarkDown/MD_Table.py similarity index 97% rename from codeMarkDown/MD_Table.py rename to monk/codeMarkDown/MD_Table.py index c4a629d..2144253 100644 --- a/codeMarkDown/MD_Table.py +++ b/monk/codeMarkDown/MD_Table.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_Text.py b/monk/codeMarkDown/MD_Text.py similarity index 97% rename from codeMarkDown/MD_Text.py rename to monk/codeMarkDown/MD_Text.py index ba08013..a70d840 100644 --- a/codeMarkDown/MD_Text.py +++ b/monk/codeMarkDown/MD_Text.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_Title.py b/monk/codeMarkDown/MD_Title.py similarity index 98% rename from codeMarkDown/MD_Title.py rename to monk/codeMarkDown/MD_Title.py index 8830d41..d010915 100644 --- a/codeMarkDown/MD_Title.py +++ b/monk/codeMarkDown/MD_Title.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_comment.py b/monk/codeMarkDown/MD_comment.py similarity index 94% rename from codeMarkDown/MD_comment.py rename to monk/codeMarkDown/MD_comment.py index edad0dd..c37f610 100644 --- a/codeMarkDown/MD_comment.py +++ b/monk/codeMarkDown/MD_comment.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/MD_lineReturn.py b/monk/codeMarkDown/MD_lineReturn.py similarity index 94% rename from codeMarkDown/MD_lineReturn.py rename to monk/codeMarkDown/MD_lineReturn.py index 9c372f3..64a94d8 100644 --- a/codeMarkDown/MD_lineReturn.py +++ b/monk/codeMarkDown/MD_lineReturn.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/codeMarkDown/codeMarkDown.py b/monk/codeMarkDown/codeMarkDown.py similarity index 98% rename from codeMarkDown/codeMarkDown.py rename to monk/codeMarkDown/codeMarkDown.py index a13b611..b482734 100644 --- a/codeMarkDown/codeMarkDown.py +++ b/monk/codeMarkDown/codeMarkDown.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys import monkTools import re diff --git a/monkModule.py b/monk/module.py similarity index 99% rename from monkModule.py rename to monk/module.py index 2b9d066..7fc2d3d 100644 --- a/monkModule.py +++ b/monk/module.py @@ -3,7 +3,7 @@ import sys import os import inspect import fnmatch -import monkDebug as debug +from realog import debug import monkTools as tools import monkNode as Node import monkParse as Parse diff --git a/monkClass.py b/monk/monkClass.py similarity index 99% rename from monkClass.py rename to monk/monkClass.py index c08891d..ed44ea4 100644 --- a/monkClass.py +++ b/monk/monkClass.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node import monkModule as module diff --git a/monkEnum.py b/monk/monkEnum.py similarity index 98% rename from monkEnum.py rename to monk/monkEnum.py index 0c75eb3..758cd10 100644 --- a/monkEnum.py +++ b/monk/monkEnum.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node class Enum(Node.Node): diff --git a/monkHtml.py b/monk/monkHtml.py similarity index 99% rename from monkHtml.py rename to monk/monkHtml.py index effce95..dbbe2fe 100644 --- a/monkHtml.py +++ b/monk/monkHtml.py @@ -1,7 +1,7 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import sys -import monkTools as tools +from . import tools #import CppHeaderParser import os import re diff --git a/monkLibrary.py b/monk/monkLibrary.py similarity index 91% rename from monkLibrary.py rename to monk/monkLibrary.py index 65cdb8b..f18653e 100644 --- a/monkLibrary.py +++ b/monk/monkLibrary.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import os import sys import re diff --git a/monkMethode.py b/monk/monkMethode.py similarity index 99% rename from monkMethode.py rename to monk/monkMethode.py index b9f5637..92fc510 100644 --- a/monkMethode.py +++ b/monk/monkMethode.py @@ -1,5 +1,5 @@ ##!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node import monkType as Type import monkVariable as Variable diff --git a/monkNamespace.py b/monk/monkNamespace.py similarity index 94% rename from monkNamespace.py rename to monk/monkNamespace.py index 166fe0e..61d3cb3 100644 --- a/monkNamespace.py +++ b/monk/monkNamespace.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node class Namespace(Node.Node): diff --git a/monkNode.py b/monk/monkNode.py similarity index 99% rename from monkNode.py rename to monk/monkNode.py index f657d71..479d8b1 100644 --- a/monkNode.py +++ b/monk/monkNode.py @@ -1,6 +1,6 @@ #!/usr/bin/python -import monkDebug as debug -import monkModule as module +from realog import debug +from . import module access_list = ['private', 'protected', 'public'] diff --git a/monkParse.py b/monk/monkParse.py similarity index 99% rename from monkParse.py rename to monk/monkParse.py index 90d985d..38750a6 100644 --- a/monkParse.py +++ b/monk/monkParse.py @@ -4,7 +4,7 @@ import sys import re 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__) + "/codeBB/") @@ -14,7 +14,7 @@ sys.path.append(tools.get_current_path(__file__) + "/codeHL/") import lex import inspect -import monkDebug as debug +from realog import debug import monkClass as Class import monkNamespace as Namespace import monkStruct as Struct diff --git a/monkStruct.py b/monk/monkStruct.py similarity index 93% rename from monkStruct.py rename to monk/monkStruct.py index e2aec2b..d620da0 100644 --- a/monkStruct.py +++ b/monk/monkStruct.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node class Struct(Node.Node): diff --git a/monkType.py b/monk/monkType.py similarity index 99% rename from monkType.py rename to monk/monkType.py index 4641392..0677b32 100644 --- a/monkType.py +++ b/monk/monkType.py @@ -1,8 +1,8 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkType as Type import monkNode as node -import monkModule as module +from . import module import re diff --git a/monkTypedef.py b/monk/monkTypedef.py similarity index 93% rename from monkTypedef.py rename to monk/monkTypedef.py index d7d6590..09c4d80 100644 --- a/monkTypedef.py +++ b/monk/monkTypedef.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node class Typedef(Node.Node): diff --git a/monkUnion.py b/monk/monkUnion.py similarity index 92% rename from monkUnion.py rename to monk/monkUnion.py index 735dddc..ff103e6 100644 --- a/monkUnion.py +++ b/monk/monkUnion.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node class Union(Node.Node): diff --git a/monkUsing.py b/monk/monkUsing.py similarity index 95% rename from monkUsing.py rename to monk/monkUsing.py index c4f976d..4d3473d 100644 --- a/monkUsing.py +++ b/monk/monkUsing.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkNode as Node import monkType as Type diff --git a/monkVariable.py b/monk/monkVariable.py similarity index 98% rename from monkVariable.py rename to monk/monkVariable.py index d8fa7f6..769c34e 100644 --- a/monkVariable.py +++ b/monk/monkVariable.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import monkDebug as debug +from realog import debug import monkType as Type import monkNode as Node diff --git a/ply/ANNOUNCE b/monk/ply/ANNOUNCE similarity index 100% rename from ply/ANNOUNCE rename to monk/ply/ANNOUNCE diff --git a/ply/CHANGES b/monk/ply/CHANGES similarity index 100% rename from ply/CHANGES rename to monk/ply/CHANGES diff --git a/ply/PKG-INFO b/monk/ply/PKG-INFO similarity index 100% rename from ply/PKG-INFO rename to monk/ply/PKG-INFO diff --git a/ply/README b/monk/ply/README similarity index 100% rename from ply/README rename to monk/ply/README diff --git a/ply/TODO b/monk/ply/TODO similarity index 100% rename from ply/TODO rename to monk/ply/TODO diff --git a/ply/doc/internal.html b/monk/ply/doc/internal.html similarity index 100% rename from ply/doc/internal.html rename to monk/ply/doc/internal.html diff --git a/ply/doc/makedoc.py b/monk/ply/doc/makedoc.py similarity index 100% rename from ply/doc/makedoc.py rename to monk/ply/doc/makedoc.py diff --git a/ply/doc/ply.html b/monk/ply/doc/ply.html similarity index 100% rename from ply/doc/ply.html rename to monk/ply/doc/ply.html diff --git a/ply/example/BASIC/README b/monk/ply/example/BASIC/README similarity index 100% rename from ply/example/BASIC/README rename to monk/ply/example/BASIC/README diff --git a/ply/example/BASIC/basic.py b/monk/ply/example/BASIC/basic.py similarity index 100% rename from ply/example/BASIC/basic.py rename to monk/ply/example/BASIC/basic.py diff --git a/ply/example/BASIC/basiclex.py b/monk/ply/example/BASIC/basiclex.py similarity index 100% rename from ply/example/BASIC/basiclex.py rename to monk/ply/example/BASIC/basiclex.py diff --git a/ply/example/BASIC/basiclog.py b/monk/ply/example/BASIC/basiclog.py similarity index 100% rename from ply/example/BASIC/basiclog.py rename to monk/ply/example/BASIC/basiclog.py diff --git a/ply/example/BASIC/basinterp.py b/monk/ply/example/BASIC/basinterp.py similarity index 100% rename from ply/example/BASIC/basinterp.py rename to monk/ply/example/BASIC/basinterp.py diff --git a/ply/example/BASIC/basparse.py b/monk/ply/example/BASIC/basparse.py similarity index 100% rename from ply/example/BASIC/basparse.py rename to monk/ply/example/BASIC/basparse.py diff --git a/ply/example/BASIC/dim.bas b/monk/ply/example/BASIC/dim.bas similarity index 100% rename from ply/example/BASIC/dim.bas rename to monk/ply/example/BASIC/dim.bas diff --git a/ply/example/BASIC/func.bas b/monk/ply/example/BASIC/func.bas similarity index 100% rename from ply/example/BASIC/func.bas rename to monk/ply/example/BASIC/func.bas diff --git a/ply/example/BASIC/gcd.bas b/monk/ply/example/BASIC/gcd.bas similarity index 100% rename from ply/example/BASIC/gcd.bas rename to monk/ply/example/BASIC/gcd.bas diff --git a/ply/example/BASIC/gosub.bas b/monk/ply/example/BASIC/gosub.bas similarity index 100% rename from ply/example/BASIC/gosub.bas rename to monk/ply/example/BASIC/gosub.bas diff --git a/ply/example/BASIC/hello.bas b/monk/ply/example/BASIC/hello.bas similarity index 100% rename from ply/example/BASIC/hello.bas rename to monk/ply/example/BASIC/hello.bas diff --git a/ply/example/BASIC/linear.bas b/monk/ply/example/BASIC/linear.bas similarity index 100% rename from ply/example/BASIC/linear.bas rename to monk/ply/example/BASIC/linear.bas diff --git a/ply/example/BASIC/maxsin.bas b/monk/ply/example/BASIC/maxsin.bas similarity index 100% rename from ply/example/BASIC/maxsin.bas rename to monk/ply/example/BASIC/maxsin.bas diff --git a/ply/example/BASIC/powers.bas b/monk/ply/example/BASIC/powers.bas similarity index 100% rename from ply/example/BASIC/powers.bas rename to monk/ply/example/BASIC/powers.bas diff --git a/ply/example/BASIC/rand.bas b/monk/ply/example/BASIC/rand.bas similarity index 100% rename from ply/example/BASIC/rand.bas rename to monk/ply/example/BASIC/rand.bas diff --git a/ply/example/BASIC/sales.bas b/monk/ply/example/BASIC/sales.bas similarity index 100% rename from ply/example/BASIC/sales.bas rename to monk/ply/example/BASIC/sales.bas diff --git a/ply/example/BASIC/sears.bas b/monk/ply/example/BASIC/sears.bas similarity index 100% rename from ply/example/BASIC/sears.bas rename to monk/ply/example/BASIC/sears.bas diff --git a/ply/example/BASIC/sqrt1.bas b/monk/ply/example/BASIC/sqrt1.bas similarity index 100% rename from ply/example/BASIC/sqrt1.bas rename to monk/ply/example/BASIC/sqrt1.bas diff --git a/ply/example/BASIC/sqrt2.bas b/monk/ply/example/BASIC/sqrt2.bas similarity index 100% rename from ply/example/BASIC/sqrt2.bas rename to monk/ply/example/BASIC/sqrt2.bas diff --git a/ply/example/GardenSnake/GardenSnake.py b/monk/ply/example/GardenSnake/GardenSnake.py similarity index 100% rename from ply/example/GardenSnake/GardenSnake.py rename to monk/ply/example/GardenSnake/GardenSnake.py diff --git a/ply/example/GardenSnake/README b/monk/ply/example/GardenSnake/README similarity index 100% rename from ply/example/GardenSnake/README rename to monk/ply/example/GardenSnake/README diff --git a/ply/example/README b/monk/ply/example/README similarity index 100% rename from ply/example/README rename to monk/ply/example/README diff --git a/ply/example/ansic/README b/monk/ply/example/ansic/README similarity index 100% rename from ply/example/ansic/README rename to monk/ply/example/ansic/README diff --git a/ply/example/ansic/clex.py b/monk/ply/example/ansic/clex.py similarity index 100% rename from ply/example/ansic/clex.py rename to monk/ply/example/ansic/clex.py diff --git a/ply/example/ansic/cparse.py b/monk/ply/example/ansic/cparse.py similarity index 100% rename from ply/example/ansic/cparse.py rename to monk/ply/example/ansic/cparse.py diff --git a/ply/example/calc/calc.py b/monk/ply/example/calc/calc.py similarity index 100% rename from ply/example/calc/calc.py rename to monk/ply/example/calc/calc.py diff --git a/ply/example/calcdebug/calc.py b/monk/ply/example/calcdebug/calc.py similarity index 100% rename from ply/example/calcdebug/calc.py rename to monk/ply/example/calcdebug/calc.py diff --git a/ply/example/classcalc/calc.py b/monk/ply/example/classcalc/calc.py similarity index 100% rename from ply/example/classcalc/calc.py rename to monk/ply/example/classcalc/calc.py diff --git a/ply/example/classcalc/calc_Calc_parsetab.py b/monk/ply/example/classcalc/calc_Calc_parsetab.py similarity index 100% rename from ply/example/classcalc/calc_Calc_parsetab.py rename to monk/ply/example/classcalc/calc_Calc_parsetab.py diff --git a/ply/example/cleanup.sh b/monk/ply/example/cleanup.sh similarity index 100% rename from ply/example/cleanup.sh rename to monk/ply/example/cleanup.sh diff --git a/ply/example/closurecalc/calc.py b/monk/ply/example/closurecalc/calc.py similarity index 100% rename from ply/example/closurecalc/calc.py rename to monk/ply/example/closurecalc/calc.py diff --git a/ply/example/hedit/hedit.py b/monk/ply/example/hedit/hedit.py similarity index 100% rename from ply/example/hedit/hedit.py rename to monk/ply/example/hedit/hedit.py diff --git a/ply/example/newclasscalc/calc.py b/monk/ply/example/newclasscalc/calc.py similarity index 100% rename from ply/example/newclasscalc/calc.py rename to monk/ply/example/newclasscalc/calc.py diff --git a/ply/example/optcalc/README b/monk/ply/example/optcalc/README similarity index 100% rename from ply/example/optcalc/README rename to monk/ply/example/optcalc/README diff --git a/ply/example/optcalc/calc.py b/monk/ply/example/optcalc/calc.py similarity index 100% rename from ply/example/optcalc/calc.py rename to monk/ply/example/optcalc/calc.py diff --git a/ply/example/unicalc/calc.py b/monk/ply/example/unicalc/calc.py similarity index 100% rename from ply/example/unicalc/calc.py rename to monk/ply/example/unicalc/calc.py diff --git a/ply/example/yply/README b/monk/ply/example/yply/README similarity index 100% rename from ply/example/yply/README rename to monk/ply/example/yply/README diff --git a/ply/example/yply/ylex.py b/monk/ply/example/yply/ylex.py similarity index 100% rename from ply/example/yply/ylex.py rename to monk/ply/example/yply/ylex.py diff --git a/ply/example/yply/yparse.py b/monk/ply/example/yply/yparse.py similarity index 100% rename from ply/example/yply/yparse.py rename to monk/ply/example/yply/yparse.py diff --git a/ply/example/yply/yply.py b/monk/ply/example/yply/yply.py similarity index 100% rename from ply/example/yply/yply.py rename to monk/ply/example/yply/yply.py diff --git a/ply/ply/__init__.py b/monk/ply/ply/__init__.py similarity index 100% rename from ply/ply/__init__.py rename to monk/ply/ply/__init__.py diff --git a/ply/ply/cpp.py b/monk/ply/ply/cpp.py similarity index 100% rename from ply/ply/cpp.py rename to monk/ply/ply/cpp.py diff --git a/ply/ply/ctokens.py b/monk/ply/ply/ctokens.py similarity index 100% rename from ply/ply/ctokens.py rename to monk/ply/ply/ctokens.py diff --git a/ply/ply/lex.py b/monk/ply/ply/lex.py similarity index 100% rename from ply/ply/lex.py rename to monk/ply/ply/lex.py diff --git a/ply/ply/yacc.py b/monk/ply/ply/yacc.py similarity index 100% rename from ply/ply/yacc.py rename to monk/ply/ply/yacc.py diff --git a/ply/setup.py b/monk/ply/setup.py similarity index 100% rename from ply/setup.py rename to monk/ply/setup.py diff --git a/ply/test/README b/monk/ply/test/README similarity index 100% rename from ply/test/README rename to monk/ply/test/README diff --git a/ply/test/calclex.py b/monk/ply/test/calclex.py similarity index 100% rename from ply/test/calclex.py rename to monk/ply/test/calclex.py diff --git a/ply/test/cleanup.sh b/monk/ply/test/cleanup.sh similarity index 100% rename from ply/test/cleanup.sh rename to monk/ply/test/cleanup.sh diff --git a/ply/test/lex_closure.py b/monk/ply/test/lex_closure.py similarity index 100% rename from ply/test/lex_closure.py rename to monk/ply/test/lex_closure.py diff --git a/ply/test/lex_doc1.py b/monk/ply/test/lex_doc1.py similarity index 100% rename from ply/test/lex_doc1.py rename to monk/ply/test/lex_doc1.py diff --git a/ply/test/lex_dup1.py b/monk/ply/test/lex_dup1.py similarity index 100% rename from ply/test/lex_dup1.py rename to monk/ply/test/lex_dup1.py diff --git a/ply/test/lex_dup2.py b/monk/ply/test/lex_dup2.py similarity index 100% rename from ply/test/lex_dup2.py rename to monk/ply/test/lex_dup2.py diff --git a/ply/test/lex_dup3.py b/monk/ply/test/lex_dup3.py similarity index 100% rename from ply/test/lex_dup3.py rename to monk/ply/test/lex_dup3.py diff --git a/ply/test/lex_empty.py b/monk/ply/test/lex_empty.py similarity index 100% rename from ply/test/lex_empty.py rename to monk/ply/test/lex_empty.py diff --git a/ply/test/lex_error1.py b/monk/ply/test/lex_error1.py similarity index 100% rename from ply/test/lex_error1.py rename to monk/ply/test/lex_error1.py diff --git a/ply/test/lex_error2.py b/monk/ply/test/lex_error2.py similarity index 100% rename from ply/test/lex_error2.py rename to monk/ply/test/lex_error2.py diff --git a/ply/test/lex_error3.py b/monk/ply/test/lex_error3.py similarity index 100% rename from ply/test/lex_error3.py rename to monk/ply/test/lex_error3.py diff --git a/ply/test/lex_error4.py b/monk/ply/test/lex_error4.py similarity index 100% rename from ply/test/lex_error4.py rename to monk/ply/test/lex_error4.py diff --git a/ply/test/lex_hedit.py b/monk/ply/test/lex_hedit.py similarity index 100% rename from ply/test/lex_hedit.py rename to monk/ply/test/lex_hedit.py diff --git a/ply/test/lex_ignore.py b/monk/ply/test/lex_ignore.py similarity index 100% rename from ply/test/lex_ignore.py rename to monk/ply/test/lex_ignore.py diff --git a/ply/test/lex_ignore2.py b/monk/ply/test/lex_ignore2.py similarity index 100% rename from ply/test/lex_ignore2.py rename to monk/ply/test/lex_ignore2.py diff --git a/ply/test/lex_literal1.py b/monk/ply/test/lex_literal1.py similarity index 100% rename from ply/test/lex_literal1.py rename to monk/ply/test/lex_literal1.py diff --git a/ply/test/lex_literal2.py b/monk/ply/test/lex_literal2.py similarity index 100% rename from ply/test/lex_literal2.py rename to monk/ply/test/lex_literal2.py diff --git a/ply/test/lex_many_tokens.py b/monk/ply/test/lex_many_tokens.py similarity index 100% rename from ply/test/lex_many_tokens.py rename to monk/ply/test/lex_many_tokens.py diff --git a/ply/test/lex_module.py b/monk/ply/test/lex_module.py similarity index 100% rename from ply/test/lex_module.py rename to monk/ply/test/lex_module.py diff --git a/ply/test/lex_module_import.py b/monk/ply/test/lex_module_import.py similarity index 100% rename from ply/test/lex_module_import.py rename to monk/ply/test/lex_module_import.py diff --git a/ply/test/lex_object.py b/monk/ply/test/lex_object.py similarity index 100% rename from ply/test/lex_object.py rename to monk/ply/test/lex_object.py diff --git a/ply/test/lex_opt_alias.py b/monk/ply/test/lex_opt_alias.py similarity index 100% rename from ply/test/lex_opt_alias.py rename to monk/ply/test/lex_opt_alias.py diff --git a/ply/test/lex_optimize.py b/monk/ply/test/lex_optimize.py similarity index 100% rename from ply/test/lex_optimize.py rename to monk/ply/test/lex_optimize.py diff --git a/ply/test/lex_optimize2.py b/monk/ply/test/lex_optimize2.py similarity index 100% rename from ply/test/lex_optimize2.py rename to monk/ply/test/lex_optimize2.py diff --git a/ply/test/lex_optimize3.py b/monk/ply/test/lex_optimize3.py similarity index 100% rename from ply/test/lex_optimize3.py rename to monk/ply/test/lex_optimize3.py diff --git a/ply/test/lex_re1.py b/monk/ply/test/lex_re1.py similarity index 100% rename from ply/test/lex_re1.py rename to monk/ply/test/lex_re1.py diff --git a/ply/test/lex_re2.py b/monk/ply/test/lex_re2.py similarity index 100% rename from ply/test/lex_re2.py rename to monk/ply/test/lex_re2.py diff --git a/ply/test/lex_re3.py b/monk/ply/test/lex_re3.py similarity index 100% rename from ply/test/lex_re3.py rename to monk/ply/test/lex_re3.py diff --git a/ply/test/lex_rule1.py b/monk/ply/test/lex_rule1.py similarity index 100% rename from ply/test/lex_rule1.py rename to monk/ply/test/lex_rule1.py diff --git a/ply/test/lex_rule2.py b/monk/ply/test/lex_rule2.py similarity index 100% rename from ply/test/lex_rule2.py rename to monk/ply/test/lex_rule2.py diff --git a/ply/test/lex_rule3.py b/monk/ply/test/lex_rule3.py similarity index 100% rename from ply/test/lex_rule3.py rename to monk/ply/test/lex_rule3.py diff --git a/ply/test/lex_state1.py b/monk/ply/test/lex_state1.py similarity index 100% rename from ply/test/lex_state1.py rename to monk/ply/test/lex_state1.py diff --git a/ply/test/lex_state2.py b/monk/ply/test/lex_state2.py similarity index 100% rename from ply/test/lex_state2.py rename to monk/ply/test/lex_state2.py diff --git a/ply/test/lex_state3.py b/monk/ply/test/lex_state3.py similarity index 100% rename from ply/test/lex_state3.py rename to monk/ply/test/lex_state3.py diff --git a/ply/test/lex_state4.py b/monk/ply/test/lex_state4.py similarity index 100% rename from ply/test/lex_state4.py rename to monk/ply/test/lex_state4.py diff --git a/ply/test/lex_state5.py b/monk/ply/test/lex_state5.py similarity index 100% rename from ply/test/lex_state5.py rename to monk/ply/test/lex_state5.py diff --git a/ply/test/lex_state_noerror.py b/monk/ply/test/lex_state_noerror.py similarity index 100% rename from ply/test/lex_state_noerror.py rename to monk/ply/test/lex_state_noerror.py diff --git a/ply/test/lex_state_norule.py b/monk/ply/test/lex_state_norule.py similarity index 100% rename from ply/test/lex_state_norule.py rename to monk/ply/test/lex_state_norule.py diff --git a/ply/test/lex_state_try.py b/monk/ply/test/lex_state_try.py similarity index 100% rename from ply/test/lex_state_try.py rename to monk/ply/test/lex_state_try.py diff --git a/ply/test/lex_token1.py b/monk/ply/test/lex_token1.py similarity index 100% rename from ply/test/lex_token1.py rename to monk/ply/test/lex_token1.py diff --git a/ply/test/lex_token2.py b/monk/ply/test/lex_token2.py similarity index 100% rename from ply/test/lex_token2.py rename to monk/ply/test/lex_token2.py diff --git a/ply/test/lex_token3.py b/monk/ply/test/lex_token3.py similarity index 100% rename from ply/test/lex_token3.py rename to monk/ply/test/lex_token3.py diff --git a/ply/test/lex_token4.py b/monk/ply/test/lex_token4.py similarity index 100% rename from ply/test/lex_token4.py rename to monk/ply/test/lex_token4.py diff --git a/ply/test/lex_token5.py b/monk/ply/test/lex_token5.py similarity index 100% rename from ply/test/lex_token5.py rename to monk/ply/test/lex_token5.py diff --git a/ply/test/lex_token_dup.py b/monk/ply/test/lex_token_dup.py similarity index 100% rename from ply/test/lex_token_dup.py rename to monk/ply/test/lex_token_dup.py diff --git a/ply/test/testlex.py b/monk/ply/test/testlex.py similarity index 100% rename from ply/test/testlex.py rename to monk/ply/test/testlex.py diff --git a/ply/test/testyacc.py b/monk/ply/test/testyacc.py similarity index 100% rename from ply/test/testyacc.py rename to monk/ply/test/testyacc.py diff --git a/ply/test/yacc_badargs.py b/monk/ply/test/yacc_badargs.py similarity index 100% rename from ply/test/yacc_badargs.py rename to monk/ply/test/yacc_badargs.py diff --git a/ply/test/yacc_badid.py b/monk/ply/test/yacc_badid.py similarity index 100% rename from ply/test/yacc_badid.py rename to monk/ply/test/yacc_badid.py diff --git a/ply/test/yacc_badprec.py b/monk/ply/test/yacc_badprec.py similarity index 100% rename from ply/test/yacc_badprec.py rename to monk/ply/test/yacc_badprec.py diff --git a/ply/test/yacc_badprec2.py b/monk/ply/test/yacc_badprec2.py similarity index 100% rename from ply/test/yacc_badprec2.py rename to monk/ply/test/yacc_badprec2.py diff --git a/ply/test/yacc_badprec3.py b/monk/ply/test/yacc_badprec3.py similarity index 100% rename from ply/test/yacc_badprec3.py rename to monk/ply/test/yacc_badprec3.py diff --git a/ply/test/yacc_badrule.py b/monk/ply/test/yacc_badrule.py similarity index 100% rename from ply/test/yacc_badrule.py rename to monk/ply/test/yacc_badrule.py diff --git a/ply/test/yacc_badtok.py b/monk/ply/test/yacc_badtok.py similarity index 100% rename from ply/test/yacc_badtok.py rename to monk/ply/test/yacc_badtok.py diff --git a/ply/test/yacc_dup.py b/monk/ply/test/yacc_dup.py similarity index 100% rename from ply/test/yacc_dup.py rename to monk/ply/test/yacc_dup.py diff --git a/ply/test/yacc_error1.py b/monk/ply/test/yacc_error1.py similarity index 100% rename from ply/test/yacc_error1.py rename to monk/ply/test/yacc_error1.py diff --git a/ply/test/yacc_error2.py b/monk/ply/test/yacc_error2.py similarity index 100% rename from ply/test/yacc_error2.py rename to monk/ply/test/yacc_error2.py diff --git a/ply/test/yacc_error3.py b/monk/ply/test/yacc_error3.py similarity index 100% rename from ply/test/yacc_error3.py rename to monk/ply/test/yacc_error3.py diff --git a/ply/test/yacc_error4.py b/monk/ply/test/yacc_error4.py similarity index 100% rename from ply/test/yacc_error4.py rename to monk/ply/test/yacc_error4.py diff --git a/ply/test/yacc_inf.py b/monk/ply/test/yacc_inf.py similarity index 100% rename from ply/test/yacc_inf.py rename to monk/ply/test/yacc_inf.py diff --git a/ply/test/yacc_literal.py b/monk/ply/test/yacc_literal.py similarity index 100% rename from ply/test/yacc_literal.py rename to monk/ply/test/yacc_literal.py diff --git a/ply/test/yacc_misplaced.py b/monk/ply/test/yacc_misplaced.py similarity index 100% rename from ply/test/yacc_misplaced.py rename to monk/ply/test/yacc_misplaced.py diff --git a/ply/test/yacc_missing1.py b/monk/ply/test/yacc_missing1.py similarity index 100% rename from ply/test/yacc_missing1.py rename to monk/ply/test/yacc_missing1.py diff --git a/ply/test/yacc_nested.py b/monk/ply/test/yacc_nested.py similarity index 100% rename from ply/test/yacc_nested.py rename to monk/ply/test/yacc_nested.py diff --git a/ply/test/yacc_nodoc.py b/monk/ply/test/yacc_nodoc.py similarity index 100% rename from ply/test/yacc_nodoc.py rename to monk/ply/test/yacc_nodoc.py diff --git a/ply/test/yacc_noerror.py b/monk/ply/test/yacc_noerror.py similarity index 100% rename from ply/test/yacc_noerror.py rename to monk/ply/test/yacc_noerror.py diff --git a/ply/test/yacc_nop.py b/monk/ply/test/yacc_nop.py similarity index 100% rename from ply/test/yacc_nop.py rename to monk/ply/test/yacc_nop.py diff --git a/ply/test/yacc_notfunc.py b/monk/ply/test/yacc_notfunc.py similarity index 100% rename from ply/test/yacc_notfunc.py rename to monk/ply/test/yacc_notfunc.py diff --git a/ply/test/yacc_notok.py b/monk/ply/test/yacc_notok.py similarity index 100% rename from ply/test/yacc_notok.py rename to monk/ply/test/yacc_notok.py diff --git a/ply/test/yacc_prec1.py b/monk/ply/test/yacc_prec1.py similarity index 100% rename from ply/test/yacc_prec1.py rename to monk/ply/test/yacc_prec1.py diff --git a/ply/test/yacc_rr.py b/monk/ply/test/yacc_rr.py similarity index 100% rename from ply/test/yacc_rr.py rename to monk/ply/test/yacc_rr.py diff --git a/ply/test/yacc_rr_unused.py b/monk/ply/test/yacc_rr_unused.py similarity index 100% rename from ply/test/yacc_rr_unused.py rename to monk/ply/test/yacc_rr_unused.py diff --git a/ply/test/yacc_simple.py b/monk/ply/test/yacc_simple.py similarity index 100% rename from ply/test/yacc_simple.py rename to monk/ply/test/yacc_simple.py diff --git a/ply/test/yacc_sr.py b/monk/ply/test/yacc_sr.py similarity index 100% rename from ply/test/yacc_sr.py rename to monk/ply/test/yacc_sr.py diff --git a/ply/test/yacc_term1.py b/monk/ply/test/yacc_term1.py similarity index 100% rename from ply/test/yacc_term1.py rename to monk/ply/test/yacc_term1.py diff --git a/ply/test/yacc_unused.py b/monk/ply/test/yacc_unused.py similarity index 100% rename from ply/test/yacc_unused.py rename to monk/ply/test/yacc_unused.py diff --git a/ply/test/yacc_unused_rule.py b/monk/ply/test/yacc_unused_rule.py similarity index 100% rename from ply/test/yacc_unused_rule.py rename to monk/ply/test/yacc_unused_rule.py diff --git a/ply/test/yacc_uprec.py b/monk/ply/test/yacc_uprec.py similarity index 100% rename from ply/test/yacc_uprec.py rename to monk/ply/test/yacc_uprec.py diff --git a/ply/test/yacc_uprec2.py b/monk/ply/test/yacc_uprec2.py similarity index 100% rename from ply/test/yacc_uprec2.py rename to monk/ply/test/yacc_uprec2.py diff --git a/monkTools.py b/monk/tools.py similarity index 99% rename from monkTools.py rename to monk/tools.py index 76864f9..3d11e97 100644 --- a/monkTools.py +++ b/monk/tools.py @@ -2,7 +2,7 @@ import os import shutil import errno -import monkDebug as debug +from realog import debug import fnmatch diff --git a/monkArg.py b/monkArg.py deleted file mode 100644 index 5f5361f..0000000 --- a/monkArg.py +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/python -import sys -import monkDebug as debug - -class ArgElement: - def __init__(self, option, value=""): - self.option = option; - self.arg = value; - - def get_option_name(self): - return self.option - - def get_arg(self): - return self.arg - - def display(self): - if len(self.arg)==0: - debug.info("option : " + self.option) - elif len(self.option)==0: - debug.info("element : " + self.arg) - else: - debug.info("option : " + self.option + ":" + self.arg) - - -class ArgDefine: - def __init__(self, - smallOption="", # like v for -v - bigOption="", # like verbose for --verbose - list=[], # ["val", "description"] - desc="", - haveParam=False): - self.option_small = smallOption; - self.option_big = bigOption; - self.list = list; - if len(self.list)!=0: - self.have_param = True - else: - if True==haveParam: - self.have_param = True - else: - self.have_param = False - self.description = desc; - - def get_option_small(self): - return self.option_small - - def get_option_big(self): - return self.option_big - - def need_parameters(self): - return self.have_param - - def get_porperties(self): - return "" - - def check_availlable(self, argument): - if len(self.list)==0: - return True - for element,desc in self.list: - if element == argument: - return True - return False - - def display(self): - if self.option_small != "" and self.option_big != "": - print(" -" + self.option_small + " / --" + self.option_big) - elif self.option_small != "": - print(" -" + self.option_small) - elif self.option_small != "": - print(" --" + self.option_big) - else: - print(" ???? ==> internal error ...") - if self.description != "": - print(" " + self.description) - if len(self.list)!=0: - hasDescriptiveElement=False - for val,desc in self.list: - if desc!="": - hasDescriptiveElement=True - break; - if hasDescriptiveElement==True: - for val,desc in self.list: - print(" " + val + " : " + desc) - else: - tmpElementPrint = "" - for val,desc in self.list: - if len(tmpElementPrint)!=0: - tmpElementPrint += " / " - tmpElementPrint += val - print(" { " + tmpElementPrint + " }") - - def parse(self, argList, currentID): - return currentID; - - -class ArgSection: - def __init__(self, - sectionName="", - desc=""): - self.section = sectionName; - self.description = desc; - - def get_option_small(self): - return "" - - def get_option_big(self): - return "" - - def get_porperties(self): - return " [" + self.section + "]" - - def display(self): - print(" [" + self.section + "] : " + self.description) - - def parse(self, argList, currentID): - return currentID; - - -class MonkArg: - def __init__(self): - self.list_properties = [] - - def add(self, argument): - self.list_properties.append(argument) #argDefine(smallOption, bigOption, haveParameter, parameterList, description)); - - def add_section(self, sectionName, sectionDesc): - self.list_properties.append(ArgSection(sectionName, sectionDesc)) - - def parse(self): - listArgument = [] # composed of list element - NotParseNextElement=False - for iii in range(1, len(sys.argv)): - # special case of parameter in some elements - if NotParseNextElement==True: - NotParseNextElement = False - continue - debug.verbose("parse [" + str(iii) + "]=" + sys.argv[iii]) - argument = sys.argv[iii] - optionList = argument.split("=") - debug.verbose(str(optionList)) - if type(optionList) == type(str()): - option = optionList - else: - option = optionList[0] - optionParam = argument[len(option)+1:] - debug.verbose(option) - argumentFound=False; - if option[:2]=="--": - # big argument - for prop in self.list_properties: - if prop.get_option_big()=="": - continue - if prop.get_option_big() == option[2:]: - # find it - debug.verbose("find argument 2 : " + option[2:]) - if prop.need_parameters()==True: - internalSub = option[2+len(prop.get_option_big()):] - if len(internalSub)!=0: - if len(optionParam)!=0: - # wrong argument ... - debug.warning("maybe wrong argument for : '" + prop.get_option_big() + "' cmdLine='" + argument + "'") - prop.display() - continue - optionParam = internalSub - if len(optionParam)==0: - #Get the next parameters - if len(sys.argv) > iii+1: - optionParam = sys.argv[iii+1] - NotParseNextElement=True - else : - # missing arguments - debug.warning("parsing argument error : '" + prop.get_option_big() + "' Missing : subParameters ... cmdLine='" + argument + "'") - prop.display() - exit(-1) - if prop.check_availlable(optionParam)==False: - debug.warning("argument error : '" + prop.get_option_big() + "' SubParameters not availlable ... cmdLine='" + argument + "' option='" + optionParam + "'") - prop.display() - exit(-1) - listArgument.append(ArgElement(prop.get_option_big(),optionParam)) - argumentFound = True - else: - if len(optionParam)!=0: - debug.warning("parsing argument error : '" + prop.get_option_big() + "' need no subParameters : '" + optionParam + "' cmdLine='" + argument + "'") - prop.Display() - listArgument.append(ArgElement(prop.get_option_big())) - argumentFound = True - break; - if False==argumentFound: - debug.error("UNKNOW argument : '" + argument + "'") - elif option[:1]=="-": - # small argument - for prop in self.list_properties: - if prop.get_option_small()=="": - continue - if prop.get_option_small() == option[1:1+len(prop.get_option_small())]: - # find it - debug.verbose("find argument 1 : " + option[1:1+len(prop.get_option_small())]) - if prop.need_parameters()==True: - internalSub = option[1+len(prop.get_option_small()):] - if len(internalSub)!=0: - if len(optionParam)!=0: - # wrong argument ... - debug.warning("maybe wrong argument for : '" + prop.get_option_big() + "' cmdLine='" + argument + "'") - prop.display() - continue - optionParam = internalSub - if len(optionParam)==0: - #Get the next parameters - if len(sys.argv) > iii+1: - optionParam = sys.argv[iii+1] - NotParseNextElement=True - else : - # missing arguments - debug.warning("parsing argument error : '" + prop.get_option_big() + "' Missing : subParameters cmdLine='" + argument + "'") - prop.display() - exit(-1) - if prop.check_availlable(optionParam)==False: - debug.warning("argument error : '" + prop.get_option_big() + "' SubParameters not availlable ... cmdLine='" + argument + "' option='" + optionParam + "'") - prop.display() - exit(-1) - listArgument.append(ArgElement(prop.get_option_big(),optionParam)) - argumentFound = True - else: - if len(optionParam)!=0: - debug.warning("parsing argument error : '" + prop.get_option_big() + "' need no subParameters : '" + optionParam + "' cmdLine='" + argument + "'") - prop.display() - listArgument.append(ArgElement(prop.get_option_big())) - argumentFound = True - break; - - if argumentFound==False: - #unknow element ... ==> just add in the list ... - debug.verbose("unknow argument : " + argument) - listArgument.append(ArgElement("", argument)) - - #for argument in listArgument: - # argument.Display() - #exit(0) - return listArgument; - - - - def display(self): - print("usage:") - listOfPropertiesArg = ""; - for element in self.list_properties : - listOfPropertiesArg += element.get_porperties() - print(" " + sys.argv[0] + listOfPropertiesArg + " ...") - for element in self.m_list_properties : - element.display() diff --git a/monkDebug.py b/monkDebug.py deleted file mode 100644 index 6e6f874..0000000 --- a/monkDebug.py +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/python -import os - -debugLevel=3 -debugColor=False - -color_default= "" -color_red = "" -color_green = "" -color_yellow = "" -color_blue = "" -color_purple = "" -color_cyan = "" - - -def set_level(id): - global debugLevel - debugLevel = id - -def enable_color(): - global debugColor - debugColor = True - global color_default - color_default= "\033[00m" - global color_red - color_red = "\033[31m" - global color_green - color_green = "\033[32m" - global color_yellow - color_yellow = "\033[33m" - global color_blue - color_blue = "\033[34m" - global color_purple - color_purple = "\033[35m" - global color_cyan - color_cyan = "\033[36m" - -def verbose(input): - global debugLock - global debugLevel - if debugLevel >= 5: - print(color_blue + input + color_default) - -def debug(input): - global debugLock - global debugLevel - if debugLevel >= 4: - print(color_green + input + color_default) - -def info(input): - global debugLock - global debugLevel - if debugLevel >= 3: - print(input + color_default) - -def warning(input): - global debugLock - global debugLevel - if debugLevel >= 2: - print(color_purple + "[WARNING] " + input + color_default) - -def error(input, threadID=-1): - global debugLock - global debugLevel - if debugLevel >= 1: - print(color_red + "[ERROR] " + input + color_default) - exit(-1) - -def print_element(type, lib, dir, name): - global debugLock - global debugLevel - if debugLevel >= 3: - print(color_cyan + type + color_default + " : " + color_yellow + lib + color_default + " " + dir + " " + color_blue + name + color_default) - - diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..88273e8 --- /dev/null +++ b/setup.py @@ -0,0 +1,71 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +## +## @author Edouard DUPIN +## +## @copyright 2012, Edouard DUPIN, all right reserved +## +## @license MPL v2.0 (see license file) +## + +from setuptools import setup +import os + +def readme(): + with open('README.md') as f: + return f.read() + +def read_version_file(): + if not os.path.isfile("version.txt"): + return "" + file = open("version.txt", "r") + data_file = file.read() + file.close() + if len(data_file) > 4 and data_file[-4:] == "-dev": + data_file = data_file[:-4] + return data_file + +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +setup(name='lutin', + version=read_version_file(), + description='Lutin generic builder (might replace makefile, CMake ...)', + long_description=readme(), + url='http://github.com/HeeroYui/doxy', + author='Edouard DUPIN', + author_email='yui.heero@gmail.com', + license='MPL-2', + packages=['lutin', + 'lutin/codeBB', + 'lutin/codeHL', + 'lutin/codeMarkDown'], + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', + 'Programming Language :: Python', + 'Topic :: Software Development :: Build Tools', + ], + long_description_content_type="text/markdown", + keywords='doc generator', + scripts=['bin/monk'], + # Does not work on MacOs + #data_file=[ + # ('/etc/bash_completion.d', ['bash-autocompletion/lutin']), + #], + install_requires=[ + 'realog', + 'death', + 'ply', + ], + include_package_data = True, + zip_safe=False) + +#To developp: sudo ./setup.py install +# sudo ./setup.py develop +#pylint test: pylint2 --rcfile=pylintRcFile.txt lutin/module.py + +#TO register all in pip: use external tools: +# pip install twine +# # create the archive +# ./setup.py sdist +# twine upload dist/* +