[Qgis-developer] Managing Python dependencies automatically for the user
Matthias Kuhn
matthias at opengis.ch
Thu Jan 14 13:13:00 PST 2016
Hi Pablo, Tim
On 01/14/2016 10:00 PM, Tim Sutton wrote:
> Hi
>
>> On 14 Jan 2016, at 18:06, Pablo Fernández Moniz
>> <pablofernandezmoniz at gmail.com
>> <mailto:pablofernandezmoniz at gmail.com>> wrote:
>>
>> Hi!
>>
>> We are currently developing a QGIS plugin were we wish to generate
>> some Excel files as output.
>>
>> In order to build the spreadsheet file we need to use some python
>> modules installed from pip (openpyxl, xlwt, etc). This dependency
>> will force every user to manually install the needed package form the
>> pip repository.
>>
>> This situation leaves us with the following question: is possible or
>> it will be in the future to manage this kind of dependencies from
>> QGIS side when the user installs the plugin?
>
> Although it has been discussed and some prototyping was done to
> support automatic installation of dependencies at the last hackfest,
> there isn’t anything in the released versions of QGIS to support this
> yet. If your packages have no operating system specific binaries in
> them, then I suggest to bundle them into your plugin and use an
> appropriate import path relative to your code. Note there is a limit
> on how big your plugin can be (I think it is 10mb) so you need to
> ensure your 3rd party deps do not bulk out your plugin too much.
We bundled xlwt and xlrd as .egg with a plugin recently:
https://github.com/opengisch/shpsync/blob/master/xlwt-1.0.0-py2.7.egg
https://github.com/opengisch/shpsync/blob/master/xlrd-0.9.4-py2.7.egg
Until there's a cross-platform dependency management (which I know that
several people are looking into) that's the safest road to follow.
Best
Matthias
>
> Regards
>
> Tim
>
>>
>> Thank you for your time!
>>
>> Kind regards.
>>
>> --
>>
>> Pablo Fernández Moniz
>> GIT Analyst
>>
>> Web <http://www.pablofm.com/> Linkedin
>> <http://www.linkedin.com/in/pablofernandezmoniz/> Twitter
>> <http://www.twitter.com/monizpablo>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org <mailto: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
>
> —
>
>
>
>
> Tim Sutton
>
> Visit http://kartoza.com to find out about open source:
>
> * Desktop GIS programming services
> * Geospatial web development
> * GIS Training
> * Consulting Services
>
> Skype: timlinux Irc: timlinux on #qgis at freenode.net
> <http://freenode.net>
> Tim is a member of the QGIS Project Steering Committee
>
> Kartoza is a merger between Linfiniti and Afrispatial
>
>
>
> _______________________________________________
> 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
--
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160114/6ac9f6da/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 9324 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160114/6ac9f6da/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160114/6ac9f6da/attachment-0001.sig>
More information about the Qgis-developer
mailing list