3

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.

3

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.

  • Thanks for the response. However, I don't think the 3 scenarios in the question are all identical with respect to the GPL. In scenario 3, I'm proposing to distribute literally 5 lines of code, in source form, without PyQt. In my reading of the GPL, Scenario 3 allows for a BSD license. – superbatfish Apr 10 '14 at 17:32
  • 1
    If your code will not work without PyQT, you can't use BSD. That makes it a "combined work" under the GPL, and so requires it to be licensed under the GPL. – Robert Harvey Apr 10 '14 at 17:33
  • Can you be more specific about which section of the GPL requires me to license my code under the GPL even if I'm not redistributing the original library? Thanks again for helping me grok this legal stuff. :-) – superbatfish Apr 10 '14 at 17:35
  • Well, that's sort of the whole point of the GPL. Just saying "well, I just won't distribute the GPL'd portion, then I won't be bound by the GPL" doesn't work. It's not about distributing the other program; it's about making your program dependent on the GPL'd work. By doing that, you've already agreed to the GPL's terms. If you could get out of the obligations of the GPL by not distributing the GPL parts, that would pretty much invalidate the whole GPL license. – Robert Harvey Apr 10 '14 at 17:44
  • The portion of the GPL license relevant to this discussion can be found in Section 5, subsection C of the license. It says "You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way." "Conveyance" means providing your program to any third party; this term is defined in the preamble of the license. – Robert Harvey Apr 10 '14 at 17:48
2

OK, this is easier than I thought. The PyQt folks didn't just release their software under the vanilla GPL. They added a special exception to the license, which allows me to release MY code under a non-GPL license. However, not all licenses are allowed: I must choose one of the open source licenses listed in the GPL_EXCEPTION.TXT file included with the PyQt source code. At the time of this writing, the exception permits me to use MIT, BSD, LGPL, and several others.

So, to address the specific scenarios outlined in the question above:

  • Scenario 1: GPL only
  • Scenario 2: GPL only
  • Scenario 3: Any license listed in GPL_EXCEPTION.TXT from the PyQt source distribution, including BSD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.