Description
There happened a useful conversation on Reddit about publishing python apps that depend on PySide and MIT/BSD wrappers around PySide/PyQt like qtpy/pyqtgraph/matplotlib. Backup of the discussion.
According that conversation there are concerns that using qtpy/pyqtgraph/matplotlib in the propriate app even with PySide backend may lead to GPL violation. The problems came from two points:
- even trying to import from PyQt may lead to the GPL "infecting",
- even having PyQt as a dependency may lead to the GPL "infecting" (so that pip/conda installation would install pyqt automatically).
After all the discussion on Reddit the best way to solve the problem seems to do that upstream: make sure that there is a reliable switch in the qtpy/pyqtgraph/matplotlib modules that effectively and reliably turns the app that uses them (app as a whole) to something like:
if False:
import PyQt
Maybe such switch is already there - but this needs checking. It's also would be great to unify that interface among modules.
And also remove PyQt from their dependencies so that they do not auto-download PyQt (I guess most of them already behave this way).
UPD
Quote about PyQt deps that are in some MIT/BSD modules:
If it's not a bug then it's a missing (or unused) feature.
I'm not as familiar with conda's own feature set, but given that these are pip installable packages, the upstream packages shouldn't declare PyQt (or PySide) as requires, but as extra_requires, and then downstream can decide to use install_requires to ensure that the they've got the GPL or LGPL GUI code of their choice. Really no package maintainer should ever include GPL code in requires without their own code being expressly GPL licensed, and that being their clear intent. If upstream packages are correctly using extra_requires and an automatic download is still being triggered then something has incorrectly set PyQt as an explicit or implicit requirement, and there's the bug.
Again though an automatic download onto the end user machine without use is something that very likely should be fixed upstream, but most likely could pass muster as an unintentional at best infringement with no meaningful impact. It's the use that implicates the GPL. The one exception is when the incidental and unused download is then bundled into a distributed artifact (like a wheel or frozen exe), because now you're distributing the GPL'd code with your own.