[Pkg-bazaar-maint] [RFC] Plugin property API
Jelmer Vernooij
jelmer at samba.org
Fri Jul 17 18:53:53 UTC 2009
Robert Collins wrote:
> On Fri, 2009-07-17 at 12:47 +0200, Jelmer Vernooij wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Robert proposed some interfaces for defining the properties of Bazaar
>> plugins a while ago, as documented in doc/developers/plugin-api.txt.
>>
>> I'm considering using this sort of information to automate the
>> updating of the dependencies in the Debian Bazaar packages, and as
>> such I plan to submit patches to add this information to the plugins
>> that are part of the Debian archive at the moment.
>>
>
> That would be nice;).
>
>
>> With the current infrastructure the minimum and maximum version of bzr
>> that is supported will have to be specified in two places: __init__.py
>> (a range of API versions that's supported) and setup.py (a mimimum and
>> maximum bzrlib version). Since this information is updated regularly
>> (pretty much every bzr version) I'd like to specify it only once, in
>> setup.py.
>>
>
> setup.py is often not present in an installed plugin. By often, I mean
> 'I haven't seen one yet'. It is present in the special case of a 'bzr
> branch to install', but not in install-via-packages plugins. And as
> Aaron says a plugin is not required to be a directory, and when its not
> there is no room for setup.py
>
> If you want to make sure that the information is in one place, I suggest
> placing it in e.g. version.py, and import that from setup, and the
> specific plugins __init__.py.
> ...
>
Unfortunately it looks like this doesn't work out of the box with 'bzr
plugin-info':
ganieda:~/bzr-rebase/trunk% bzr plugin-info .
bzr: ERROR: No module named info
You may need to install this Python library separately.
I could of course make setup.py update sys.path, but it would be nicer
if plugin-info could so I don't have to do so in each and every plugin.
Cheers,
Jelmer
More information about the Pkg-bazaar-maint
mailing list