|
From: Chris F. <cd...@fo...> - 2012-08-14 21:00:58
|
On Tue, Aug 14, 2012 at 08:04:20PM +0100, Mark Ellis wrote: > Yes you'll see it if you just import dbus. No other unresolved symbols, > the python extension objects are linked against all the other libs they > need, just not libpython. Thanks. I think we'll need to convert the python_module into a OSYNC_START_TYPE_EXTERNAL type plugin, but which does not run as its own plugin at all, only a helper. Each python script would also be an external plugin, and be configured by .xml file instead of using the get_sync_info() function callback. The .xml file would reference the python_module program in the <ExternalCommand> element. See the docs/examples/plugins/src/external* files for an example. I think we'd use something like this for the sample.py: <ExternalPlugin version="1"> <Name>python-sample</Name> <LongName>Sample Python plugin</LongName> <Description>Longer description for the sample python plugin.</Description> <ExternalCommand>python_module sample.py %s</ExternalCommand> </ExternalPlugin> This should give each python script module its own forked process space, which might be a good idea. Installing a python module would be a matter of copying the .py script into the usual libopensync1/python-plugins/ directory, and an .xml config into libopensync1/plugins/. The above example would run python_module, which would search under /python-plugins/ for sample.py and use the %s pipe to communicate with opensync. I think this will work. Let me know if you have other ideas, and I'll be implementing it in the meantime. - Chris |