5

Given that QGIS is licensed under GNU GPLv2+, if you create a QGIS python script that would run in the QGIS Python console, such as the example in their docs, does the python script have to be licensed under GNU GPLv2+ as well? The qgis.core and qgis.utils python modules that the console automatically runs are licensed under GNU GPLv2+ it seems so that might affect things.

In particular, does your python script have to be licensed under GNU GPLv2+ if it is going to be distributed and sold to a client?

Based on https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#TOCIfInterpreterIsGPL it would seem that you can develop python scripts that run on the QGIS python interpreter, but as soon as they call GNU GPLv2+ licensed python modules like qgis.core or qgis.utils, which come with the interpreter, then the python script must also be licensed under GNU GPLv2+. Furthermore, based on https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#TOCDevelopChangesUnderNDA you can still distribute that python script to a client under a contract (i.e., for a fee), however, the distributed code must also be licensed under GNU GPLv2+ (i.e., they can also distribute it, but likely will choose not to).

1 Answer 1

5

Your analysis is correct. As soon as you use QGIS features, when you distribute your script you must license your script under the GPL license (version 2 or 3). That gives recipients of the script the right to make changes and to re-distribute the script with or without changes.

Unless the script is made available to the general public (i.e. published on a publicly available server or in a publicly available repository), the GPL license does not give any particular rights to the general public

3
  • Thanks. Could you clarify what you mean by, "the GPL license does not give any particular rights to the general public"? I thought as soon as anyone got access to the code, whether it was posted publicly or not, then they had the same distribution rights as outlined in the GPL. Commented Aug 30 at 12:45
  • 1
    @NicolasUrsus, many people incorrectly believe, especially for copyleft licenses, "open source == available to the general public" and I wanted to make it clear that that is not the case. Everyone who receives the code has the right to distribute it further, but they don't have an obligation to do so. People who don't have the code also don't have any rights. Commented Aug 30 at 12:57
  • ... and in that vein, it's not quite correct to say "As soon as you use QGIS features, you must license your script under the GPL license". If you do not distribute your software then you are not obligated to choose any license for it at all. It is when you distribute your software to others, as that is defined in the GPL, that you incur the obligation to license it (to the recipients) under the GPL. Commented Aug 30 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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