[Qgis-developer] Version number in plugin path?

Carson Farmer carson.farmer at gmail.com
Tue Nov 4 11:11:59 EST 2008


Hey gang,

The other possibility, if we are concerned about compatibility with 
older versions, is that the plugins are only fetched from 
~/.qgis/python/plugins, however, putting additional folders in 
~/.qgis/python, such as /1_x_plugins, would not cause any problems ( I 
have lots of 'extra' plugins here that backups, or no longer maintained 
etc). This then, would allow users to have two versions of QGIS 
installed, both with the same plugins at different versions (so I could 
have and older version of ftools in ~/.qgis/python/plugins, and then a 
newer version associated with trunk in ~/.qgis/python/1_x_plugins.

This eliminates the issue Martin described earlier regarding:

> - we can't move 0.11 plugins to python/plugins/0.11/ because of
> compatibility as 0.11 searches plugins directly in python/plugins/
> dir.
> - adding new directory 1.0 into plugins would probably raise python
> exceptions in qgis 0.11 as it won't contain a correct plugin
which relates to Barry's comment about plugin directory names:
>  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?).
>   
and if implemented right, the installer could still list all installed 
plugins, indicating that some are old api and some are new api, as per 
Borys' comment, using the __init__.py  apiVersion() flag idea. Thus, old 
plugins would stay in the /plugins directory, and if an older plugin is 
downloaded from an older api repository, it would also be placed in the 
/plugins folder. However, new plugins (downloaded from a new api 
repository) would be installed in /1_x_plugins. Then, based on the 
apiVersion() flag, only load them if we are using the correct version.


Thoughts?

Carson

-- 
Carson J.Q. Farmer
PhD Fellow
National Centre for Geocomputation (NCG),
John Hume Building,
National University of Ireland, Maynooth,
Co. Kildare,
Ireland.
http://www.carsonfarmer.com
http://www.ftools.ca



More information about the Qgis-developer mailing list