1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-03-17 00:32:01 +01:00

Autotools adaptation for new directories

This commit is contained in:
prieto 2017-02-17 09:25:54 +01:00
commit 2174b23ec6
6 changed files with 16 additions and 9 deletions

View file

@ -12,6 +12,8 @@ AC_CONFIG_FILES([Makefile \
lodel/leapi/datahandlers/Makefile \ lodel/leapi/datahandlers/Makefile \
lodel/plugin/Makefile \ lodel/plugin/Makefile \
lodel/settings/Makefile \ lodel/settings/Makefile \
lodel/validator/Makefile \
lodel/mlnamedobject/Makefile \
lodel/utils/Makefile \ lodel/utils/Makefile \
progs/Makefile \ progs/Makefile \
progs/slim/Makefile \ progs/slim/Makefile \

View file

@ -1,4 +1,4 @@
SUBDIRS=auth editorial_model leapi plugin settings utils plugins SUBDIRS=auth editorial_model leapi plugin settings utils plugins validator mlnamedobject
EXTRA_DIST = plugins EXTRA_DIST = plugins
lodel_PYTHON = *.py lodel_PYTHON = *.py
CLEANFILES = buildconf.py CLEANFILES = buildconf.py

View file

@ -254,17 +254,19 @@ class DataHandler(MlNamedObject):
return all_handlers[name] return all_handlers[name]
# @brief List all datahandlers # @brief List all datahandlers
# @return # @return a dict with, display_name for keys, and a dict for value
@classmethod @classmethod
def list_data_handlers(cls): def list_data_handlers(cls):
cls.load_base_handlers() cls.load_base_handlers()
all_handlers = dict(cls._base_handlers, **cls.__custom_handlers) all_handlers = dict(cls._base_handlers, **cls.__custom_handlers)
list_dh = dict() list_dh = dict()
for hdl in all_handlers: for hdl in all_handlers:
list_dh[hdl] = (display_name=hdl.display_name, \ list_dh[hdl.display_name] = {'help_text' : hdl.help_text,
help_text=hdl.help_text, nullable=hdl.nullable, \ 'nullable' : hdl.nullable, \
internal=hdl.internal, immutable=hdl.immutable, \ 'internal' : hdl.internal,
primary_key=hdl.primary_key, options=self.options_spec) 'immutable' : hdl.immutable, \
'primary_key' : hdl.primary_key, \
'options' : self.options_spec}
return list_dh return list_dh

View file

@ -0,0 +1,2 @@
mlnamedobject_PYTHON= *.py
mlnamedobjectdir=$(pkgpythondir)/mlnamedobject

View file

@ -8,8 +8,7 @@ from lodel.context import LodelContext
LodelContext.expose_modules(globals(), { LodelContext.expose_modules(globals(), {
'lodel.logger': 'logger', 'lodel.logger': 'logger',
'lodel.settings.utils': ['SettingsError', 'SettingsErrors'], 'lodel.settings.utils': ['SettingsError', 'SettingsErrors']})
'lodel.validator.validator': ['ValidationError']})
##@brief Merges and loads configuration files ##@brief Merges and loads configuration files
class SettingsLoader(object): class SettingsLoader(object):
@ -104,7 +103,7 @@ class SettingsLoader(object):
key_id=section+'.'+keyname) key_id=section+'.'+keyname)
self.__errors_list.append(expt) self.__errors_list.append(expt)
else: else:
expt = ValidationError("For %s.%s : %s" % (section, keyname, e)) #expt = ValidationError("For %s.%s : %s" % (section, keyname, e))
expt2 = SettingsError(msg=str(expt), \ expt2 = SettingsError(msg=str(expt), \
key_id=section+'.'+keyname, \ key_id=section+'.'+keyname, \
filename=sec[keyname]['file']) filename=sec[keyname]['file'])

View file

@ -0,0 +1,2 @@
validator_PYTHON=*.py
validatordir=$(pkgpythondir)/validator