[Qgis-developer] Version number in plugin path?

Martin Dobias wonder.sk at gmail.com
Tue Nov 4 08:02:37 EST 2008

On Tue, Nov 4, 2008 at 1:51 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> 2008/11/4 Martin Dobias <wonder.sk at gmail.com>:
>> So probably a better way would be add a function to plugin's
>> __init__.py called e.g. apiVersion() that would state what (minimal)
>> version of QGIS the plugin needs. Plugins with apiVersion 1.1 won't be
>> loaded in 1.0 but will load in 1.3. And if we break API in QGIS 2.0
>> plugin manager will know that any plugins with apiVersion 1.x are
>> unsupported.
>> What do you think, guys?
>  How do I keep both a 0.11-compatible version and a 1.0-compatible
> version of my fnord plugin in the same directory? The folder name has
> to be 'fnord' (doesn't it?).

Well, I've forgotten to write that it won't be straightforward to use
plugin in different versions of QGIS. The question is - do we really
need/want it? If we really need that, there's a possibility to add
some logic to its __init__.py that would detect QGIS version and
configure itself appropriately. Or you can have the plugin in two
different directories, e.g. fnord and fnord_legacy (or fnord_0-11).

Or we could use a brute-force mechanism that for QGIS 1.0 we change
qgis user dir from ~/qgis/ to ~/qgis/1.0/
This would maybe solve also some more potential incompatibilities.


More information about the Qgis-developer mailing list