[Qgis-developer] Version number in plugin path?
wonder.sk at gmail.com
Tue Nov 4 07:37:16 EST 2008
On Sun, Nov 2, 2008 at 12:09 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> Given the API changes between 0.11 and 1.0, wouldn't it be sensible to
> put the version number in plugin paths? So that plugins for 0.11 would
> be in ~user/.qgis/python/plugins/0.11/ and those for 1.0 would be in
that's a good idea. But maybe there are some possible issues I have in my mind:
- we can't move 0.11 plugins to python/plugins/0.11/ because of
compatibility as 0.11 searches plugins directly in python/plugins/
- adding new directory 1.0 into plugins would probably raise python
exceptions in qgis 0.11 as it won't contain a correct plugin
> The granularity of the version number in the path only needs to match
> that of the api stability, so if the next api change is for 2.0, then
> there's probably no need to have a /1.1/ plugin folder.
Well... if we're going to add new functionality to API in 1.x versions
and there will be plugins using this new functionality, we would need
a directory for any version where some functions/classes are added.
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
What do you think, guys?
More information about the Qgis-developer