Licensing – Under What License May a PyQt-Based ‘Hello World’ App Be Distributed?

gpllicensingpyqt4

Update: I was wrong about the PyQt license. It isn't merely a GPL license. The PyQt authors include a special set of exceptions that allow users to release their own code under a different license, as long as it is one of the Open-Source licenses specifically listed in the PyQt GPL_EXCEPTION.TXT file.


For the purpose of this discussion, consider the following fully-functional app, which depends on PyQt:

# hello_world.py
from PyQt4.QtGui import QApplication, QPushButton
app = QApplication([])
button = QPushButton("Hello, World!", clicked=app.quit)
button.show()
app.exec_()

(In case it's relevant to the discussion, please note that Python programs like this one do not require "linking" per se.)

My preference is to distribute my code under a permissive license, e.g. the BSD license. However, PyQt is released under the GNU GPL GNU GPL with special exceptions. With that in mind, what are my options here? Am I obligated to release under the GPL, even if I don't distribute PyQt itself?

To be more specific, in which (if any) of the following scenarios am I permitted to release my code under the BSD license vs. being obligated to release under the GPL?

  • Scenario 1: I give you a fully-packaged binary that includes hello_world.py and PyQt.
  • Scenario 2: I give you the source code of hello_world.py and PyQt in a single download (say, a .tar.gz), but it's up to you to get them running together.
  • Scenario 3: I give you hello_world.py alone, leaving you to obtain PyQt on your own.

I know that most of us aren't lawyers, so it is very much appreciated if you can cite the sources your answer is based on.

Best Answer

Once GPL, Always GPL.

You can't distribute under the BSD if one of the libraries on which your application depends is licensed under GPL, nor can you close your source code.

Dual licensing using GPL and a commercial license is a common arrangement among vendors. It basically states that, if you want to use their library for a "true" open-source application (where you provide the entirety of the application's source code to the end-user, and let them do with it what they wish with it, so long as they also abide by the GPL) then you are welcome to use their library for that purpose. Otherwise, you can gain the right to close your source by buying a commercial copy of their license.

So the short answer is, so long as you are providing the source code to your application, all three scenarios should be OK. Your distribution license would be GPL, not BSD.

My citation is the GPL license.

Related Topic