<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">hi<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Oct 2015, at 19:28, Alessandro Pasotti <<a href="mailto:apasotti@gmail.com" class="">apasotti@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">2015-10-26 18:16 GMT+01:00 Hugo Mercier<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:hugo.mercier@oslandia.com" target="_blank" class="">hugo.mercier@oslandia.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Hi Alessandro,<br class=""><span class=""><br class="">On 26/10/2015 17:50, Alessandro Pasotti wrote:<br class=""><br class="">> Hello Hugo,<br class="">><br class="">> IMHO using  setuptools and pip it's a good idea, it does support<br class="">> download and install from several protocols (git included) out of the<br class="">> box, it also support dependencies and keywords licence tags, I'm not<br class="">> sure that it can support custom tags too, but it it's not so important.<br class=""></span></blockquote></div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>We have discussed this in the past (I’ll try to find a reference in the mailing list archives) but note that using setup tools / pip has a couple of issues:</div><div><br class=""></div><div>1) Expecting a compiler for cpython module compilation is unrealistic. Even if the compiler is there expecting the needed dev libs to be available is unrealistic. The simple approach to this is to bundle cpython using the approach described by Victor and use the dependency mechanism for pure python modules only. </div><div>2) What happens when plugin A tries to install Raven==4.0 and plugin B wants to install Raven==5.0? Plugins will end up trampling over each other dependencies and breaking each other. The solution for that is to use a virtualenv per plugin and expose the QGIS libs into the virtual env. But then we have a problem (maybe its ok?) that plugins cannot depend on each other and import each other’s packages.</div><div><br class=""></div><div>I must say I like the idea of having stuff installed into virtualenvs. I’m not so sure about uploading the plugins themselves to pip - I can see the attraction of that but it also adds another layer of overhead for people starting out with plugin development. </div><div><br class=""></div><div>Regards</div><div><br class=""></div><div>Tim</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class="">><br class="">> I guess that most of the times, a plugin would not even need to be<br class=""></span>> hosted by us on<span class="Apple-converted-space"> </span><a href="http://plugins.qgis.org/" rel="noreferrer" target="_blank" class="">plugins.qgis.org</a><span class="Apple-converted-space"> </span><<a href="http://plugins.qgis.org/" rel="noreferrer" target="_blank" class="">http://plugins.qgis.org</a>> but it could<br class=""><span class="">> just be a git(hub) URI (with a big red warning to the the users that<br class="">> they are installing software from an external repository  etc. etc.).<br class=""><br class=""></span>Exactly. That are interesting features.<br class=""><span class=""><br class="">><br class="">> I'm not sure about the support on other platforms, luckily (for me) I'm<br class="">> deeply ignorant about other OSes but it seems that windows users often<br class="">> have a lot of problems with installing and running python code: would<br class="">> pip/setuptools make things easier for them?<br class=""><br class=""></span>Actually, this is the main concern I have with the current system: most<br class="">of the Windows users get their python environment through the QGIS<br class="">installer or osgeo4w. And if a plugin needs another dependency, it has<br class="">to be installed by other means.<br class="">Pip does exist for Windows and OSX and could act as a package manager<br class="">(where Linux users are usually happy with their distro package manager)<br class=""><span class=""><br class="">><br class="">> I don't understand completely what do you mean with the other points<br class="">> (virtualenvs and binary parts) can you elaborate?<br class=""><br class=""></span>These are just ideas for now :) I don't have a strong experience with<br class="">these tools, so it would have to be confirmed.<br class="">But the idea is that if QGIS plugins are built with setuptools / pip,<br class="">then you can setup different virtualenvs with different sets of plugins<br class="">available in them. That may be interesting when dealing with different<br class="">user profiles or during development.<br class=""><br class="">About binary parts: setuptools allows to insert compilation directives<br class="">if a module depends on C(++) parts. I don't know if this feature could<br class="">allow plugins with compiled parts ... the idea would be to include C(++)<br class="">sources with the plugin and have a standard way of compiling it, so that<br class="">it could be compiled by trusted sources on main platforms ... or by the<br class="">user if a standard compilation environment is present.<br class=""></blockquote></div><br class=""><br class=""></div><div class="gmail_extra">Some random thoughts:<br class=""><br class=""></div><div class="gmail_extra">Quite powerful... but ... the current plugin packaging has very limited requirements: it's just a zipped folder with a couple of mandatory metadata and a class interface, building a simple plugin is definitely an easy task.<br class=""><br class=""></div><div class="gmail_extra">I'm afraid that by using a much more complicate system (such as setuptools), would solve some problem for the (few) complex plugins and create a lot of problems and increase the barrier for the vast majority of simpler plugin authors.<br class=""></div><div class="gmail_extra"></div><div class="gmail_extra"><br class=""></div><div class="gmail_extra">We should take this into account and think carefully.<br class=""><br clear="all" class=""></div><div class="gmail_extra"><br class="">--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature">Alessandro Pasotti<br class="">w3:  <span class="Apple-converted-space"> </span><a href="http://www.itopen.it/" target="_blank" class="">www.itopen.it</a></div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Qgis-developer mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:Qgis-developer@lists.osgeo.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Qgis-developer@lists.osgeo.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></blockquote></div><br class=""><div apple-content-edited="true" class="">
<span><img height="60" width="60" apple-inline="yes" id="D22B24A3-24E6-4342-838E-C8BD523F79B7" apple-width="yes" apple-height="yes" src="cid:DDEF9B12-67C3-4498-BD7D-EC3563CC35A4" class=""></span><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class="Apple-interchange-newline"><br class=""></div><div class="">Tim Sutton</div><div class="">QGIS Project Steering Committee Member</div><div class=""><a href="mailto:tim@qgis.org" class="">tim@qgis.org</a></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>