Merge lp:~zeitgeist/zeitgeist/autoload-extensions into lp:zeitgeist/0.1
Proposed by
Mikkel Kamstrup Erlandsen
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Mikkel Kamstrup Erlandsen | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~zeitgeist/zeitgeist/autoload-extensions | ||||
Merge into: | lp:zeitgeist/0.1 | ||||
Diff against target: |
343 lines (+115/-40) 15 files modified
Makefile.am (+5/-1) _zeitgeist/Makefile.am (+1/-1) _zeitgeist/engine/Makefile.am (+1/-1) _zeitgeist/engine/__init__.py (+0/-28) _zeitgeist/engine/extension.py (+46/-1) _zeitgeist/engine/extensions/Makefile.am (+1/-1) _zeitgeist/engine/main.py (+3/-3) _zeitgeist/engine/upgrades/Makefile.am (+1/-1) _zeitgeist/loggers/Makefile.am (+1/-1) _zeitgeist/loggers/datasources/Makefile.am (+1/-1) acinclude.m4 (+40/-0) configure.ac (+5/-0) zeitgeist-daemon.pc.in (+7/-0) zeitgeist/__init__.py (+1/-0) zeitgeist/_config.py.in (+2/-1) |
||||
To merge this branch: | bzr merge lp:~zeitgeist/zeitgeist/autoload-extensions | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Markus Korn | python parts | Approve | |
Review via email: mp+28236@code.launchpad.net |
Description of the change
THis branch implements automatic loading of extensions found in the extensions/ directory. You can still override this via the ZEITGEIST_
It also installs zeitgeist-daemon.pc which defines a 'extensiondir' variable 3rd party extension developers can use to detect the path in which to install extensions.
To post a comment you must log in.
First of all: I don't zhave enough autotools knowlege to understand what the non-python part of this patch is all about, but some test installations show that it seems to work as expected.
This is why I only had a closer look at the python part, it is looking perfect to me, BUT I have a few minor comments:
dict.get(<key>) always returns None if <key> is not found in dict, this is why os.environ( "ENVVAR_ NAME", None) should be simplified to os.environ( "ENVVAR_ NAME")
And I've a second, not too serious comment: You are doing to much C stuff! - this explains to me the ugly extra spaces you are adding to the code ;) engine. extensions. " + mod) "Searching for extensions in: %s" % config. extensiondir) or modules = filter(lambda m : m.endswith(".py"), os.listdir( config. extensiondir) )
Some examples:
* extensions = _scan_extensions () or _zg = __import__ ("_zeitgeist.
* log.debug(
Other that that, big Approval.
thnks for your work,
markus