3

I wish to release a non-commercial python application under GPL3 in both source and (PyInstaller) executable form. I'm struggling to find a consistent answer to the problem of imported modules.

Can I just put the usual GPL headers on my source files, include the GPL in COPYING and leave it at that?

Or do I have to collect together all the licences and source code (both python and, e.g. C/C++ dependencies) for everything that I import and include these in my distribution? I'm assuming that I don't, but reading the GPL3 licence suggests* that I do. Surely I don't have to ship the source for Qt, PyQt4, Numpy, Scipy, Matplotlib, Gdal etc. etc. in my distribution?

I also want to distribute a windows binary because the end users are unlikely to use the software if they have to run from source. This will package and re-distribute python and all the shared library dependancies. What are my legal obligations here with GPL? Are the imports 'Major Components' and therefore do not need to have the source distributed?


Section 1, Source code:

... The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code...

2

You asked:

Can I just put the usual GPL headers on my source files, include the GPL in COPYING and leave it at that?

Yes, that's fine.

Or do I have to collect together all the licences and source code (both python and, e.g. C/C++ dependencies) for everything that I import and include these in my distribution?

No, because they won't be released as their previous license


To be a little less cryptic about that.

So long as the incorporated projects have GPL compatible licenses, when you include the modules within your program, you are effectively re-licensing those modules as GPL'd modules. That's why you don't have to1 worry about including their previous license state.

As far as distributing the code - The GPL doesn't require you to distribute the code along with the binary. It only requires you to make the code available for distribution. That's an important nuance to keep in mind.

Given that your project is going to subsume other projects, I would encourage you to make available for distribution the source code of the projects that you incorporated into your application.


How all of the re-licensing works is a little complicated. Have a look at an earlier answer of mine to understand how the GPL and copyleft apply to compatibly licensed projects that are incorporated into another.

The shortest summary from my earlier answer is the FSF quote explaining how it works.

It means that the other license and the GNU GPL are compatible; you can combine code released under the other license with code released under the GNU GPL in one larger program.

1 You really, really do need to make sure that their current license is a GPL compatible license though. You are not legally allowed to incorporate a non-compatiblely licensed project within your GPL application. You would need to look at possibly the LGPL or AGPL instead.

0

The GPL primarily puts obligations on persons redistributing your code. You can't sue yourself for breaching the GPL anyway, so what you do with your own code is your own decision.

Now, whether you need to redistribute source code for those libraries depends on their licenses, not yours. You may be able to rely on subsection 6c in case they use (L)GPL 3: "Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.".

Where it gets tricky is when you mix MIT/BSD code with existing GPL'ed code. This may force you to provide all sources per the GPL license, as all that code is needed to build your GPL-licensed executable. You can't refuse to distribute MIT/BSD code when GPL code depends on it.

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.