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