[QGIS-Developer] QGIS plugin depends on pypi package

Greg Troxel gdt at lexort.com
Fri Feb 9 05:36:28 PST 2024


John Lindsay via QGIS-Developer <qgis-developer at lists.osgeo.org> writes:

> I believe that I've solved my earlier issue with my QGIS plugin, which
> previously relied on a pip package. In order to avoid this dependency,
> I decided to include the Whitebox Workflows wheel in with my
> plugin. Unfortunately, however, this has increased the size of my
> plugin fairly substantially. The issue is that I need to included a
> wheel for each of the four supported operating systems and each are
> about 10MB. My plugin zip file is now a little less than 40MB. When I
> try to upload the new version to the QGIS plugin repo it is telling me
> that the file is too large. Does anyone know what the maximum size of
> a plugin zip file is? Thanks.

I was unaware that there was an explicit list of 4 operating systems
(and perhaps you mean 4 OS-version-CPU tuples, if this is a binary
wheel, even if those function on later os-version-cpu systems).

But even if one accepts a triculture (which I personally don't), then I
would expect you'd need wheels for

  linux-?-x86_64
  linux-?-earmv7
  linux-?-aarch64
  mac-?-x86_64
  mac-?-aarch64
  windows-10-x86_64

which is 6 not 4.  I'm unclear on Windows on ARM (because I choose to be
unclear on Windows :-).  Plus RISC-V is on the horizon.  So this rapidly
becomes unworkable.

(Certainly, I can see that qgis.org delivers binaries of qgis for a
limited set of systems, but qgis the source code obviously ought to be
buildable and runnable on any reasonable system that 99.9% meets POSIX,
plus perhaps a few extensions.)


What happens when you try to install the plugin on a system for which
you don't provide a binary wheel?

I have seen thing like Home Assistant just try "import and if that fails
call pip install" but that is a "this program has sufficient
portability/stability issues needing pinned dependencies that the only
viable path is to run inside a venv" situation.


It also strikes me that binary wheels inside plugins are a security and
licensing issue.  While I don't mean to suggest you are doing anything
improper, I expect plugins to be just python code.  From a licensing
point of view, the plugin has to be GPL and thus any included binary
wheels also have to be provided under the GPL.  If they were a
GPL-compatible permissive license, that then triggers obligatiions for
provide sources that weren't there before, and aren't presenet with "you
need to install X".  Do we have existing practice about this?



More information about the QGIS-Developer mailing list