1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-11-13 01:19:16 +01:00

Enhancement of distclean target

Now when running distclean ALL files generated by the ./bootstrap && ./configure && make are deleted.
Maybe it's not a good idea because it's not the purpose of distclean target...
This commit is contained in:
Yann 2016-08-31 09:26:57 +02:00
commit b5a6adc3a8
11 changed files with 58 additions and 3 deletions

View file

@ -1,2 +1,5 @@
plugin_PYTHON=*.py
plugindir=$(pkgythondir)/plugin
distclean-local:
-rm Makefile Makefile.in

View file

@ -6,7 +6,7 @@ import lodel.plugin.scripts as lodel_script
#@ingroup lodel2_script
##@brief Implements lodel_admin.py discover-plugin action
##@brief Implements lodel_admin.py **discover-plugin** action
#@ingroup lodel2_plugins
#@ingroup lodel2_script
#
@ -38,4 +38,31 @@ without modifying existing cache")
print("\t- %s(%s) in %s" % (
pname, pinfos['version'], pinfos['path']))
##@brief Implements lodel_admin.py **hooks-list** action
#@ingroup lodel2_script
#@ingroup lodel2_hooks
class ListHooks(lodel_script.LodelScript):
_action = 'hooks-list'
_description = 'Generate a list of registered hooks once instance started'
@classmethod
def argparser_config(cls, parser):
pass
@classmethod
def run(cls, args):
import loader
loader.start()
from lodel.plugin.hooks import LodelHook
hlist = LodelHook.hook_list()
print("Registered hooks : ")
for name in sorted(hlist.keys()):
print("\t- %s is registered by :" % name)
for hfun, priority in hlist[name]:
msg = "\t\t- {modname}.{funname} with priority : {priority}"
print(msg.format(
modname = hfun.__module__,
funname = hfun.__name__,
priority = priority))
print("\n")