I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is what the FSF has to say on the issue:
我正在用Python开发一个GPL许可的应用程序,需要知道GPL是否允许我的程序使用专有的插件。这就是FSF在这个问题上所说的话:
If a program released under the GPL uses plug-ins, what are the requirements for the licenses of a plug-in?
如果根据GPL发布的程序使用插件,那么插件的许可证有哪些要求?
It depends on how the program invokes its plug-ins. If the program uses fork and exec to invoke plug-ins, then the plug-ins are separate programs, so the license for the main program makes no requirements for them.
这取决于程序如何调用其插件。如果程序使用fork和exec来调用插件,那么插件就是单独的程序,因此主程序的许可证对它们没有要求。
If the program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single program, which must be treated as an extension of both the main program and the plug-ins. This means the plug-ins must be released under the GPL or a GPL-compatible free software license, and that the terms of the GPL must be followed when those plug-ins are distributed.
如果程序动态链接插件,并且它们相互进行函数调用并共享数据结构,我们认为它们形成一个程序,必须将其视为主程序和插件的扩展。这意味着插件必须在GPL或兼容GPL的免费软件许可下发布,并且在分发这些插件时必须遵循GPL的条款。
If the program dynamically links plug-ins, but the communication between them is limited to invoking the ‘main’ function of the plug-in with some options and waiting for it to return, that is a borderline case.
如果程序动态链接插件,但它们之间的通信仅限于使用某些选项调用插件的“main”函数并等待它返回,这是一个临界情况。
The distinction between fork/exec and dynamic linking, besides being kind of artificial, doesn't carry over to interpreted languages: what about a Python/Perl/Ruby plugin, which gets loaded via import
or execfile
?
fork / exec和动态链接之间的区别,除了是一种人为的,也不会延续到解释语言:Python / Perl / Ruby插件怎么样,通过import或execfile加载?
(edit: I understand why the distinction between fork/exec and dynamic linking, but it seems like someone who wanted to comply with the GPL but go against the "spirit" --I don't-- could just use fork/exec and interprocess communication to do pretty much anything).
(编辑:我理解为什么fork / exec和动态链接之间的区别,但似乎有人想要遵守GPL但反对“精神” - 我不能 - 只能使用fork / exec和进程间通信几乎可以做任何事情)。
The best solution would be to add an exception to my license to explicitly allow the use of proprietary plugins, but I am unable to do so since I'm using Qt/PyQt which is GPL.
最好的解决方案是在我的许可证中添加一个例外以明确允许使用专有插件,但我无法这样做,因为我使用的是Qt / PyQt,这是GPL。
3 个解决方案
#1
6
he distinction between fork/exec and dynamic linking, besides being kind of artificial,
他区分fork / exec和动态链接,除了是人为的,
I don't think its artificial at all. Basically they are just making the division based upon the level of integration. If the program has "plugins" which are essentially fire and forget with no API level integration, then the resulting work is unlikely to be considered a derived work. Generally speaking a plugin which is merely forked/exec'ed would fit this criteria, though there may be cases where it does not. This case especially applies if the "plugin" code would work independently of your code as well.
我认为它不是人为的。基本上他们只是根据整合水平进行划分。如果程序具有“插件”,这些插件本质上是火灾而忘记没有API级别集成,那么结果工作不太可能被视为派生工作。一般来说,只是分叉/执行的插件符合此标准,尽管可能存在不符合此标准的情况。如果“插件”代码也可以独立于您的代码工作,则此情况尤其适用。
If, on the other hand, the code is deeply dependent upon the GPL'ed work, such as extensively calling APIs, or tight data structure integration, then things are more likely to be considered a derived work. Ie, the "plugin" cannot exist on its own without the GPL product, and a product with this plugin installed is essentially a derived work of the GPLed product.
另一方面,如果代码严重依赖于GPL的工作,例如广泛调用API,或者紧密的数据结构集成,那么事情就更有可能被视为派生工作。即,如果没有GPL产品,“插件”本身就不能存在,并且安装了此插件的产品本质上是GPLed产品的派生作品。
So to make it a little more clear, the same principles could apply to your interpreted code. If the interpreted code relies heavily upon your APIs (or vice-versa) then it would be considered a derived work. If it is just a script that executes on its own with extremely little integration, then it may not.
因此,为了使其更清晰,相同的原则可能适用于您的解释代码。如果解释的代码在很大程度上依赖于您的API(反之亦然),那么它将被视为派生的工作。如果它只是一个脚本,只需极少的集成即可自行执行,那么它可能不会。
Does that make more sense?
那更有意义吗?
#2
1
@Daniel
The distinction between fork/exec and dynamic linking, besides being kind of artificial, doesn't carry over to interpreted languages: what about a Python/Perl/Ruby plugin, which gets loaded via import or execfile?
I'm not sure that the distinction is artificial. After a dynamic load the plugin code shares an execution context with the GPLed code. After a fork/exec it does not.
我不确定这种区别是否是人为的。动态加载后,插件代码与GPLed代码共享执行上下文。在fork / exec之后它没有。
In anycase I would guess that import
ing causes the new code to run in the same execution context as the GPLed bit, and you should treat it like the dynamic link case. No?
在任何情况下,我都认为导入会导致新代码在与GPLed位相同的执行上下文中运行,您应该将其视为动态链接案例。没有?
#3
1
How much info are you sharing between the Plugins and the main program? If you are doing anything more than just executing them and waiting for the results (sharing no data between the program and the plugin in the process) then you could most likely get away with them being proprietary, otherwise they would probably need to be GPL'd.
您在插件和主程序之间共享了多少信息?如果你正在做的不仅仅是执行它们并等待结果(在程序和插件之间不共享数据)那么你很可能会让它们成为专有的,否则它们可能需要成为GPL' d。
#1
6
he distinction between fork/exec and dynamic linking, besides being kind of artificial,
他区分fork / exec和动态链接,除了是人为的,
I don't think its artificial at all. Basically they are just making the division based upon the level of integration. If the program has "plugins" which are essentially fire and forget with no API level integration, then the resulting work is unlikely to be considered a derived work. Generally speaking a plugin which is merely forked/exec'ed would fit this criteria, though there may be cases where it does not. This case especially applies if the "plugin" code would work independently of your code as well.
我认为它不是人为的。基本上他们只是根据整合水平进行划分。如果程序具有“插件”,这些插件本质上是火灾而忘记没有API级别集成,那么结果工作不太可能被视为派生工作。一般来说,只是分叉/执行的插件符合此标准,尽管可能存在不符合此标准的情况。如果“插件”代码也可以独立于您的代码工作,则此情况尤其适用。
If, on the other hand, the code is deeply dependent upon the GPL'ed work, such as extensively calling APIs, or tight data structure integration, then things are more likely to be considered a derived work. Ie, the "plugin" cannot exist on its own without the GPL product, and a product with this plugin installed is essentially a derived work of the GPLed product.
另一方面,如果代码严重依赖于GPL的工作,例如广泛调用API,或者紧密的数据结构集成,那么事情就更有可能被视为派生工作。即,如果没有GPL产品,“插件”本身就不能存在,并且安装了此插件的产品本质上是GPLed产品的派生作品。
So to make it a little more clear, the same principles could apply to your interpreted code. If the interpreted code relies heavily upon your APIs (or vice-versa) then it would be considered a derived work. If it is just a script that executes on its own with extremely little integration, then it may not.
因此,为了使其更清晰,相同的原则可能适用于您的解释代码。如果解释的代码在很大程度上依赖于您的API(反之亦然),那么它将被视为派生的工作。如果它只是一个脚本,只需极少的集成即可自行执行,那么它可能不会。
Does that make more sense?
那更有意义吗?
#2
1
@Daniel
The distinction between fork/exec and dynamic linking, besides being kind of artificial, doesn't carry over to interpreted languages: what about a Python/Perl/Ruby plugin, which gets loaded via import or execfile?
I'm not sure that the distinction is artificial. After a dynamic load the plugin code shares an execution context with the GPLed code. After a fork/exec it does not.
我不确定这种区别是否是人为的。动态加载后,插件代码与GPLed代码共享执行上下文。在fork / exec之后它没有。
In anycase I would guess that import
ing causes the new code to run in the same execution context as the GPLed bit, and you should treat it like the dynamic link case. No?
在任何情况下,我都认为导入会导致新代码在与GPLed位相同的执行上下文中运行,您应该将其视为动态链接案例。没有?
#3
1
How much info are you sharing between the Plugins and the main program? If you are doing anything more than just executing them and waiting for the results (sharing no data between the program and the plugin in the process) then you could most likely get away with them being proprietary, otherwise they would probably need to be GPL'd.
您在插件和主程序之间共享了多少信息?如果你正在做的不仅仅是执行它们并等待结果(在程序和插件之间不共享数据)那么你很可能会让它们成为专有的,否则它们可能需要成为GPL' d。