Salve a tutti, qualcuno sa come si risolve il problema delle librerie esterne richieste dai plugin ?
Dove vanno inserite ? Si possono inserire all'interno del plugin, invece di doverle inserire all'interno di ogni nuova versione di QGIS, come ad esempio : QGIS VERSIONE\apps\Python27\Lib\site-packages\ ? A proposito di questo, di seguito c'è il messaggio di Victor Olaya che ho trovato all'interno della lista qgis-dev , ma non riesco a far funzionare le sue istruzioni. Qualcuno può aiutarmi ? :) Penso sia un problema che interessa parecchi sviluppatori di plugin. Grazie per qualunque info in proposito A presto Roberto ---------- Forwarded message ---------- From: Geo DrinX <[email protected]> Date: 2015-10-21 15:28 GMT+02:00 Subject: Re: [Qgis-developer] Plugin Dependencies To: Victor Olaya <[email protected]> Cc: qgis-developer <[email protected]> Ola Victor ! :) 2015-10-07 17:50 GMT+02:00 Victor Olaya <[email protected]>: > 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
_______________________________________________ [email protected] http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss Questa e' una lista di discussione pubblica aperta a tutti. I messaggi di questa lista non hanno relazione diretta con le posizioni dell'Associazione GFOSS.it. 786 iscritti al 30.9.2015
