[Qgis-developer] Plugin requirements
Arnaud Morvan
arnaud.morvan at camptocamp.com
Thu Dec 8 07:11:27 PST 2016
Hello Xavier,
here we are used to create a virtualenv at build time (in make build or
make install target), in the plugin folder,
the virtual env site-package folder is added to the python sys path in
plugin __init__.py file before the class factory.
Note that it is necessary to add this virtualenv to the plugin package
(in make package target for example).
With this the plugin package can be big, but is self contained.
Cheers
Arnaud Morvan
Ingénieur logiciel
Tél: +33 (0)4 58 48 20 32
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com
Le 07/12/2016 15:22, Luigi Pirelli a écrit :
> Hi Xavier
>
> 1) pip can be installed on OSGeo4W (many references on the gis stack
> exchange and on the web)
> 2) paver do nothing other than creating python eggs or now you can use
> wheel format, then setting pythonpath starting the plugin allow you to
> load module from local modules... paver is a utility to simplify
> packaging
>
> cheers
>
> Luigi Pirelli
>
> **************************************************************************************************
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> * https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
> **************************************************************************************************
>
>
> On 7 December 2016 at 10:44, Xavier Barnada <xbarnada at gisce.net> wrote:
>> Hi Alessandro,
>>
>> Thank you for the example, I will study paver to see how it works
>>
>> Cheers
>>
>> 2016-12-07 9:49 GMT+01:00 Alessandro Pasotti <apasotti at gmail.com>:
>>> On Wed, Dec 7, 2016 at 9:43 AM, Xavier Barnada <xbarnada at gisce.net> wrote:
>>>> Hi all,
>>>>
>>>> I been working on a plugin that uses another python requirements like
>>>> lxml.
>>>>
>>>> The problem it's that I solved the requirements problem on Linux calling
>>>> pip command but this don't work on QGIS with Windows because Windows don't
>>>> incorporate python or pip.
>>>>
>>>> In my opinion QGIS API should provide a way to install packages but i
>>>> supose that it's not so easy as I imagine.
>>>>
>>>> How do you use to solve this problem? There is any example of it? I
>>>> searched it on the documentation and don't appear any reference about how to
>>>> do it.
>>>>
>>>> Best reggards
>>>> Xavier Barnada
>>>>
>>>>
>>>
>>> Hi Xavier!
>>>
>>> We've considered adding a mechanism for plugin dependencies, (I've
>>> recently added a metadata for that purpose) but this seems a bit difficult
>>> to work cross-platform, BTW I'd be very happy to see some efforts in that
>>> area.
>>>
>>> What we normally do is to package and ship dependencies with the plugin
>>> itself, you can have a look to this example:
>>> https://github.com/boundlessgeo/qgis-geoserver-plugin/blob/master/pavement.py#L48
>>>
>>> Cheers.
>>>
>>> --
>>> Alessandro Pasotti
>>> w3: www.itopen.it
>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list