[Qgis-developer] Plugin Dependencies
Geo DrinX
geodrinx at gmail.com
Wed Oct 21 06:28:09 PDT 2015
Ola Victor ! :)
2015-10-07 17:50 GMT+02:00 Victor Olaya <volayaf at gmail.com>:
> At the moment, you have to ship them with your plugin, in the plugin
> zip file. If the lib uses native code, you will need to include
> binaries for all OSs that you want to support, and the corresponding
> mechanism to pick one or the other.
>
> As an example, you can see how it is done in this plugin
>
>
> https://github.com/boundlessgeo/qgis-geoserver-plugin/blob/master/src/geoserverexplorer/__init__.py
>
> Dependencies are stored in a folder called "ext-libs", which is added
> to the python path by the plugin
>
> Notice that that folder is not in the repo, there is a paver task to
> fetch the dependencies from PyPi
>
> Notice also that QGIS has its folder with python libs
>
> https://github.com/qgis/QGIS/tree/master/python/ext-libs
>
> Make sure that the libs you require are not already in there
In my case ( GEarthView QGIS plugin ) I have two external libraries:
twisted
zope
that I need to install manually :(
On windows, they need to be copied for each new version of QGIS, inside
the folder:
QGIS VERSION\apps\Python27\Lib\site-packages\
Instead, on MacOSX, they are (once and for all) inside the standard
python library folder, as I explained in my blog:
http://exporttocanoma.blogspot.it/2015/01/gearthview-20-plugin-per-qgis.html
I have tried several times to make sure that it was not necessary to
install anything, including the libraries in my plugins, so far I have not
succeeded. So, that your message has rekindled my hopes :) but there
are some things I do not understand, in your explanation (my fault).
Here are my steps:
1) I modified my geodrinx/__init__.py adding:
site.addsitedir(os.path.abspath(os.path.dirname(__file__) + '/ext-libs'))
Question: where need I to create this ext-libs folder ? I looked
into the plugin that you indicate, but I found no "ext-libs" folder.
Could you please explain me (us) better ?
Thank you much
A presto
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151021/5421e956/attachment.html>
More information about the Qgis-developer
mailing list