If a Python module X is licensed under GPL and a Python script or module Y imports X, does it make Y necessarily GPL also?
2 Answers
Yes eventually the GPL flows to the calling/importing code at runtime. At rest the import statement has no impact per se.
- 14,441
- 2
- 32
- 87
Nothing makes Y GPL, short of the author of Y licensing it under GPL or a court order requiring them to do so.
Using a GPL code in Y without licensing Y under GPL makes such use illegal. This only affects the author of Y if they explicitly enable such use, e.g. they distribute Y alongside with X, or Y is distributed alone while X is a well-known GPL library one could expect to be installed on a target system. This would not turn Y license into GPL automatically, but it would open the author of Y to lawsuits, and releasing Y under GPL could be one of the possible outcomes. Alternatively, the author of Y could chose to pay damages to their users, retract the non-compliant version of Y and refrain from distributing Y until it is modified in a way to make it compliant.
If Y is distributed with a closed-sourced version of X, there will be no violation even if an open-source version of X exists and users could technically switch to it by altering Y.
- 1,362
- 10
- 20
-
I am not sure that the user in the last paragraph would be in violation, as they are free to use however they wish. And changing the linkage of Y does not make a derivative work of X. – ctrl-alt-delor Nov 18 '20 at 22:08
-
import abc. It is not possible to determine the licence of what will be imported at this time. It is not even possible to be sure what will be imported. – ctrl-alt-delor Nov 19 '20 at 17:07