GPL程序的专用插件:解释语言呢?

2024-05-23 15:55:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在用Python开发一个GPL许可的应用程序,需要知道GPL是否允许我的程序使用专有插件。这是关于这个问题的what the FSF has to say

If a program released under the GPL uses plug-ins, what are the requirements for the licenses of a plug-in?

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.

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.

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.

fork/exec和动态链接之间的区别,除了某种程度上是人工的之外,并没有延续到解释语言上:Python/Perl/Ruby插件是通过importexecfile加载的呢?在

(编辑:我理解为什么fork/exec和动态链接之间的区别,但似乎有些人想要遵守GPL,却违背了“精神”——我不——可以使用fork/exec和进程间通信来做几乎任何事情)。在

最好的解决方案是在我的许可证中添加一个异常来显式地允许使用专有插件,但是我不能这样做,因为我使用的是Qt/PyQt,这是GPL。在


Tags: andoftheto插件forifmain
3条回答

he distinction between fork/exec and dynamic linking, besides being kind of artificial,

我不认为这是人为的。基本上,他们只是在整合的基础上进行划分。如果程序中有“插件”,这些插件本质上是没有API级集成的“即开即弃”的,那么所产生的工作就不太可能被视为派生工作。一般来说,一个仅仅是fork/exec'ed的插件就符合这个标准,尽管在某些情况下它可能不符合这个标准。这种情况尤其适用于“插件”代码也可以独立于代码工作的情况。在

另一方面,如果代码深深依赖于GPL的工作,比如广泛调用api,或者紧密的数据结构集成,那么事情就更有可能被认为是派生的工作。也就是说,没有GPL产品,“插件”就不能独立存在,而安装了这个插件的产品本质上是GPLed产品的衍生产品。在

因此,为了让它更清楚一点,同样的原则也可以应用于您解释的代码。如果解释的代码严重依赖于您的api(反之亦然),那么它将被视为一个派生的工作。如果它只是一个独立执行的脚本,集成度非常低,那么它可能不会。在

这样更有意义吗?在

@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?

我不确定这种区别是人为的。动态加载后,插件代码与GPLed代码共享一个执行上下文。在fork/exec之后就不会了。在

无论如何,我猜importing会导致新代码在与GPLed位相同的执行上下文中运行,您应该将其视为动态链接情况。不?在

你在插件和主程序之间共享了多少信息?如果你所做的不仅仅是执行它们并等待结果(在进程中程序和插件之间不共享数据),那么你很可能会因为它们是私有的而逃脱惩罚,否则它们可能需要GPL

相关问题 更多 >