[Qgis-developer] Plugins discussion

Stéphane Brunner stephane.brunner at camptocamp.com
Sat Nov 7 09:54:55 PST 2015


Hello,

And we can use entrypoints to load the plugin:

from pkg_resources import working_set

def register_plugins():
    for entry_point in working_set.iter_entry_points('qgis.plugins'):
        plugin = entry_point.load(require=True)
        if not issubclass(plugin, Plugin):
            raise ValueError(
                'Registered plugin '%s' must derive from ``Plugin``' %
entry_point.name)

         ...

CU
Stéphane


2015-11-07 18:48 GMT+01:00 Stéphane Brunner <stephane.brunner at camptocamp.com
>:

> Hello,
>
> To get all the qgis plugin hosted on pypi we should be able to use a
> keywords.
>
> An to get the list of plugin that have some keywords:
>
> from xmlrpclib import ServerProxy
> pypi = ServerProxy("http://pypi.python.org/pypi", allow_none=True)
> sp.search({"keywords": ["gdal", "dap"]})
>
> returns:
> [{'_pypi_ordering': False,
>   'name': 'dap.plugins.gdal',
>   'summary': 'GDAL plugin for pydap server',
>   'version': '0.1.1'}]
>
> CU
> Stéphane
>
>
> 2015-11-06 16:03 GMT+01:00 Hugo Mercier <hugo.mercier at oslandia.com>:
>
>> A summary about our other discussion of the morning on Python plugin
>> dependencies and the opportunity to now use pip rather than our custom
>> system.
>>
>> For plugins with external dependencies, we can :
>> - add fields in metadata.txt to declare the dependencies (a pip install
>> string)
>> - for Windows and Mac users, ask package managers to include pip in them.
>>
>> This way, we will have a simple way to gently warn the user a dependency
>> is missing. And the missing dependencies will be easily installable from
>> osgeo4w (or the mac equivalent).
>>
>> This is the very first step and solves an important issue.
>>
>> Alessandro is working on the metadata update. And two issues have been
>> added for the installers:
>> http://hub.qgis.org/issues/13775
>> http://hub.qgis.org/issues/13777
>>
>> About using setuptools for Python plugins and/or the pypi infrastructure
>> for our plugins, no decision yet.
>>
>> We did not talk about the common framework of python functions. But I
>> think things are already going well on this side.
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> --
> camptocamp.com
> mapfish.org
>



-- 
camptocamp.com
mapfish.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151107/3cf889ae/attachment-0001.html>


More information about the Qgis-developer mailing list