Re: [QGIS-Developer] Embedded py libs in plugis

2019-05-01 Thread Paolo Cavallini
Hi all,

On 30/04/19 19:33, Richard Duivenvoorde wrote:

> I think the only reason to discourage the inclusion (IF we did, I'm not
> sure) is that some modules are not cross platform (but most smaller ones
> are) or are just too big to include.
> Some (eg Requests) made live really easier (though we have alternatives
> I think). And others were just needed but not appropriate to bundle with
> QGIS.
> 
> So I would think it is ok to include them as long it is practical.

having inspected hundreds of plugins in the last years, I'm still unsure
this is a good approach. I think it induces bad habits (e.g. one plugin
had a modified gdal command, so these improvements were essentially
lost). For the very same reasons, this practice is formally forbidden
e.g. in Debian. I'm aware this puts some extra strain on developers and
users, but results in better software in the long term.

> We also have been talking about some mechanisme to make it possible to
> (pip)-install from within QGIS, some kind of virtual environment within
> QGIS.
> But that is to be done :-)

this seems quite right to me.

Cheers, and thanks for comments.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Embedded py libs in plugis

2019-04-30 Thread Richard Duivenvoorde
On 29/04/2019 20.49, Paolo Cavallini wrote:
> Hi all,
> until now we discouraged the inclusion of external python libraries in
> python plugins. I still think this is the right, clean approach. I just
> want to check with main core devs if there are strong reasons to change
> the approach.

I think the only reason to discourage the inclusion (IF we did, I'm not
sure) is that some modules are not cross platform (but most smaller ones
are) or are just too big to include.
Some (eg Requests) made live really easier (though we have alternatives
I think). And others were just needed but not appropriate to bundle with
QGIS.

So I would think it is ok to include them as long it is practical.

We also have been talking about some mechanisme to make it possible to
(pip)-install from within QGIS, some kind of virtual environment within
QGIS.
But that is to be done :-)

Regards,

Richard Duivenvoorde
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Embedded py libs in plugis

2019-04-30 Thread Paolo Cavallini
Hi all,
thanks for comments. We have always encouraged devs to use shared libs,
and to declare dependencies in metadata. I see two problems in letting
anybody including wildly:
* code duplication: with hundreds of plugins, reinstalling the same
libraries over and over, possibly in different versions, does not look
the Right Thing To Do to me; when needed, commonly used libs have been
included (thanks Juerghen!) in osgeo4w standalone installer, a much
cleaner solution IMHO; of course, in Linux this would only be a burden
with no significant advantages. In addition, this encourages devs to
take shortcuts, patching and forking libs, including older versions
instead of upgrading, etc.; to me this sounds a bit like windows vs
linux approach
* licences: I should check then the licences of all the libraries
embedded, that often do not include a LICENCE file.
Cheers.

On 30/04/19 18:31, Etienne Trimaille wrote:
> Nothing is written in the documentation about not embedding python
> libraries:
> https://plugins.qgis.org/publish/
> 
> Le mar. 30 avr. 2019 à 18:17, Matthias Kuhn  > a écrit :
> 
> Hi,
> 
> I also was under the impression that this it's ok to ship
> dependencies within plugins.
> 
> One of the major blockers towards a better world (TM) is that no
> pip(-like) tool to auto-install dependency packages at runtime is
> available on all platforms (looking at you, Windows). Meanwhile
> shipping dep libraries as wheels/eggs/... sounds like the best user
> experience a plugin dev can deliver.
> 
> Regards
> 
> Matthias
> 
> On 4/30/19 6:11 PM, Tim Sutton wrote:
>> Hi
>>
>> Yeah I also don’t remember any specific policy discouraging it,
>> and as long as they are namespaces nicely it is nicer IMHO than
>> requiring users to go and manually fetch extra packages so your
>> plugin will work.
>>
>> Regards
>>
>> Tim
>>
>>> On 30 Apr 2019, at 16:57, Luigi Pirelli >> > wrote:
>>>
>>> Are you sure? or are you referring embedding binary library? pure
>>> python lib or python eggs, IMHO do not generate problems if used
>>> in the plugin code without modify pythonpath for the all the env.
>>>
>>> Am I wrong?
>>>
>>> Luigi Pirelli
>>>
>>> 
>>> **
>>> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>>> * Stackexchange:
>>> http://gis.stackexchange.com/users/19667/luigi-pirelli
>>> * GitHub: https://github.com/luipir
>>> * Mastering QGIS 2nd Edition:
>>> *
>>> 
>>> https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
>>> * Hire me: http://goo.gl/BYRQKg
>>> 
>>> **
>>>
>>>
>>> On Mon, 29 Apr 2019 at 20:50, Paolo Cavallini
>>> mailto:cavall...@faunalia.it>> wrote:
>>>
>>> Hi all,
>>> until now we discouraged the inclusion of external python
>>> libraries in
>>> python plugins. I still think this is the right, clean
>>> approach. I just
>>> want to check with main core devs if there are strong reasons
>>> to change
>>> the approach.
>>> Thanks for comments.
>>> Cheers.
>>> -- 
>>> Paolo Cavallini - www.faunalia.eu 
>>> QGIS.ORG  Chair:
>>> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> 
>>> List info:
>>> https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe:
>>> https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>> ___
>>> QGIS-Developer mailing list
>>> QGIS-Developer@lists.osgeo.org
>>> 
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> —
>>
>>
>>
>>
>>
>>
>>
>>
>> *Tim Sutton*
>>
>> *Co-founder:* Kartoza
>> *Ex Project chair:* QGIS.org 
>>
>> 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 
>>
>> I'd love to connect. Here's my calendar link
>>  to make finding time easy.
>>
>>
>> ___
>> QGIS-Developer 

Re: [QGIS-Developer] Embedded py libs in plugis

2019-04-30 Thread Etienne Trimaille
Nothing is written in the documentation about not embedding python
libraries:
https://plugins.qgis.org/publish/

Le mar. 30 avr. 2019 à 18:17, Matthias Kuhn  a écrit :

> Hi,
>
> I also was under the impression that this it's ok to ship dependencies
> within plugins.
>
> One of the major blockers towards a better world (TM) is that no
> pip(-like) tool to auto-install dependency packages at runtime is available
> on all platforms (looking at you, Windows). Meanwhile shipping dep
> libraries as wheels/eggs/... sounds like the best user experience a plugin
> dev can deliver.
>
> Regards
>
> Matthias
> On 4/30/19 6:11 PM, Tim Sutton wrote:
>
> Hi
>
> Yeah I also don’t remember any specific policy discouraging it, and as
> long as they are namespaces nicely it is nicer IMHO than requiring users to
> go and manually fetch extra packages so your plugin will work.
>
> Regards
>
> Tim
>
> On 30 Apr 2019, at 16:57, Luigi Pirelli  wrote:
>
> Are you sure? or are you referring embedding binary library? pure python
> lib or python eggs, IMHO do not generate problems if used in the plugin
> code without modify pythonpath for the all the env.
>
> Am I wrong?
>
> Luigi Pirelli
>
>
> **
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS 2nd Edition:
> *
> https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
> * Hire me: http://goo.gl/BYRQKg
>
> **
>
>
> On Mon, 29 Apr 2019 at 20:50, Paolo Cavallini 
> wrote:
>
>> Hi all,
>> until now we discouraged the inclusion of external python libraries in
>> python plugins. I still think this is the right, clean approach. I just
>> want to check with main core devs if there are strong reasons to change
>> the approach.
>> Thanks for comments.
>> Cheers.
>> --
>> Paolo Cavallini - www.faunalia.eu
>> QGIS.ORG  Chair:
>> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> —
>
>
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Ex Project chair:* QGIS.org
>
> 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
>
> I'd love to connect. Here's my calendar link
>  to make finding time easy.
>
>
> ___
> QGIS-Developer mailing listqgis-develo...@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> --
> Matthias Kuhn
> matth...@opengis.ch
> +41 (0)76 435 67 63 <+41764356763>
> [image: OPENGIS.ch Logo] 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Embedded py libs in plugis

2019-04-30 Thread Matthias Kuhn
Hi,

I also was under the impression that this it's ok to ship dependencies
within plugins.

One of the major blockers towards a better world (TM) is that no
pip(-like) tool to auto-install dependency packages at runtime is
available on all platforms (looking at you, Windows). Meanwhile shipping
dep libraries as wheels/eggs/... sounds like the best user experience a
plugin dev can deliver.

Regards

Matthias

On 4/30/19 6:11 PM, Tim Sutton wrote:
> Hi
>
> Yeah I also don’t remember any specific policy discouraging it, and as
> long as they are namespaces nicely it is nicer IMHO than requiring
> users to go and manually fetch extra packages so your plugin will work.
>
> Regards
>
> Tim
>
>> On 30 Apr 2019, at 16:57, Luigi Pirelli > > wrote:
>>
>> Are you sure? or are you referring embedding binary library? pure
>> python lib or python eggs, IMHO do not generate problems if used in
>> the plugin code without modify pythonpath for the all the env.
>>
>> Am I wrong?
>>
>> Luigi Pirelli
>>
>> **
>> * LinkedIn: https://www.linkedin.com/in/luigipirelli
>> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
>> * GitHub: https://github.com/luipir
>> * Mastering QGIS 2nd Edition:
>> *
>> https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
>> * Hire me: http://goo.gl/BYRQKg
>> **
>>
>>
>> On Mon, 29 Apr 2019 at 20:50, Paolo Cavallini > > wrote:
>>
>> Hi all,
>> until now we discouraged the inclusion of external python
>> libraries in
>> python plugins. I still think this is the right, clean approach.
>> I just
>> want to check with main core devs if there are strong reasons to
>> change
>> the approach.
>> Thanks for comments.
>> Cheers.
>> -- 
>> Paolo Cavallini - www.faunalia.eu 
>> QGIS.ORG  Chair:
>> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> —
>
>
>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Ex Project chair:* QGIS.org 
>
> 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 
>
> I'd love to connect. Here's my calendar link
>  to make finding time easy.
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-- 
Matthias Kuhn
matth...@opengis.ch 
+41 (0)76 435 67 63 
OPENGIS.ch Logo 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Embedded py libs in plugis

2019-04-30 Thread Tim Sutton
Hi

Yeah I also don’t remember any specific policy discouraging it, and as long as 
they are namespaces nicely it is nicer IMHO than requiring users to go and 
manually fetch extra packages so your plugin will work.

Regards

Tim

> On 30 Apr 2019, at 16:57, Luigi Pirelli  wrote:
> 
> Are you sure? or are you referring embedding binary library? pure python lib 
> or python eggs, IMHO do not generate problems if used in the plugin code 
> without modify pythonpath for the all the env.
> 
> Am I wrong?
> 
> Luigi Pirelli
> 
> **
> * LinkedIn: https://www.linkedin.com/in/luigipirelli 
> 
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli 
> 
> * GitHub: https://github.com/luipir 
> * Mastering QGIS 2nd Edition:
> * 
> https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
>  
> 
> * Hire me: http://goo.gl/BYRQKg 
> **
> 
> 
> On Mon, 29 Apr 2019 at 20:50, Paolo Cavallini  > wrote:
> Hi all,
> until now we discouraged the inclusion of external python libraries in
> python plugins. I still think this is the right, clean approach. I just
> want to check with main core devs if there are strong reasons to change
> the approach.
> Thanks for comments.
> Cheers.
> -- 
> Paolo Cavallini - www.faunalia.eu 
> QGIS.ORG  Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/ 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

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

I'd love to connect. Here's my calendar link  to 
make finding time easy.

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Embedded py libs in plugis

2019-04-30 Thread Luigi Pirelli
Are you sure? or are you referring embedding binary library? pure python
lib or python eggs, IMHO do not generate problems if used in the plugin
code without modify pythonpath for the all the env.

Am I wrong?

Luigi Pirelli

**
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
*
https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
* Hire me: http://goo.gl/BYRQKg
**


On Mon, 29 Apr 2019 at 20:50, Paolo Cavallini  wrote:

> Hi all,
> until now we discouraged the inclusion of external python libraries in
> python plugins. I still think this is the right, clean approach. I just
> want to check with main core devs if there are strong reasons to change
> the approach.
> Thanks for comments.
> Cheers.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS.ORG Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer