Browse Source

Autotools adaptation for new directories

prieto 8 years ago
parent
commit
2174b23ec6

+ 2
- 0
configure.ac View File

@@ -12,6 +12,8 @@ AC_CONFIG_FILES([Makefile \
12 12
 		lodel/leapi/datahandlers/Makefile \
13 13
 	lodel/plugin/Makefile \
14 14
 	lodel/settings/Makefile \
15
+	lodel/validator/Makefile \
16
+	lodel/mlnamedobject/Makefile \
15 17
 	lodel/utils/Makefile \
16 18
 	progs/Makefile \
17 19
 	progs/slim/Makefile \

+ 1
- 1
lodel/Makefile.am View File

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

+ 7
- 5
lodel/leapi/datahandlers/base_classes.py View File

@@ -254,17 +254,19 @@ class DataHandler(MlNamedObject):
254 254
         return all_handlers[name]
255 255
 
256 256
     # @brief List all datahandlers
257
-    # @return
257
+    # @return a dict with, display_name for keys, and a dict for value 
258 258
     @classmethod
259 259
     def list_data_handlers(cls):
260 260
         cls.load_base_handlers()
261 261
         all_handlers = dict(cls._base_handlers, **cls.__custom_handlers)
262 262
         list_dh = dict()
263 263
         for hdl in all_handlers:
264
-            list_dh[hdl] = (display_name=hdl.display_name, \
265
-                            help_text=hdl.help_text, nullable=hdl.nullable, \
266
-                            internal=hdl.internal, immutable=hdl.immutable, \
267
-                            primary_key=hdl.primary_key, options=self.options_spec)
264
+            list_dh[hdl.display_name] = {'help_text' : hdl.help_text,
265
+                            'nullable' : hdl.nullable, \
266
+                            'internal' : hdl.internal,
267
+                            'immutable' : hdl.immutable, \
268
+                            'primary_key' : hdl.primary_key, \
269
+                            'options' : self.options_spec}
268 270
 
269 271
         return list_dh
270 272
 

+ 2
- 0
lodel/mlnamedobject/Makefile.am View File

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

+ 2
- 3
lodel/settings/settings_loader.py View File

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

+ 2
- 0
lodel/validator/Makefile.am View File

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

Loading…
Cancel
Save