关于在商业代码中导入 GPL 的 Python 库的问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/999468/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 21:14:27  来源:igfitidea点击:

Question on importing a GPL'ed Python library in commercial code

pythonlicensinggpl

提问by ragebiswas

We're evaluating a couple of Python libraries for Graph manipulation. We tried 'networkx' (http://networkx.lanl.gov/) and 'igraph' (http://igraph.sourceforge.net/).

我们正在评估几个用于图形操作的 Python 库。我们尝试了“networkx”(http://networkx.lanl.gov/)和“igraph”(http://igraph.sourceforge.net/)。

While both are excellent modules, igraph is faster due to its nature - it's a Python wrapper over libigraph - a blistering fast graph C library (uses LAPACK etc).

虽然两者都是优秀的模块,但 igraph 由于其性质而更快 - 它是 libigraph 上的 Python 包装器 - 一个快速的图形 C 库(使用 LAPACK 等)。

Now, the igraph library is GPL licensed. My question is: Can I import igraph and use it in my commercial Python script?

现在,igraph 库已获得 GPL 许可。我的问题是:我可以导入 igraph 并在我的商业 Python 脚本中使用它吗?

(This is a general question, not just limited to igraph. Apologies if the answer is obvious - I'm a license-newb!)

(这是一个普遍的问题,不仅限于 igraph。如果答案很明显,我很抱歉 - 我是一个执照新手!)

Thanks, Raj

谢谢,拉吉

EDIT: More specifically, does simply importing a GPL Python module make my commercial code liable to be released to the public?

编辑:更具体地说,简单地导入 GPL Python 模块是否会使我的商业代码易于向公众发布?

采纳答案by nosklo

IANAL, but:

IANAL,但是:

Now, the igraph library is GPL licensed. My question is: Can I import igraph and use it in my commercial Python script?

现在,igraph 库已获得 GPL 许可。我的问题是:我可以导入 igraph 并在我的商业 Python 脚本中使用它吗?

YES. You can write commercial software and distribute it under the GPL. Nothing on GPL prevents commerce. It even explicity says that you can SELL your software at will,

是的。您可以编写商业软件并在 GPL 下分发它。GPL 上的任何内容都不会阻止商业活动。它甚至明确表示您可以随意出售您的软件,

More specifically, does simply importing a GPL Python module make my commercial code liable to be released to the public?

更具体地说,简单地导入 GPL Python 模块是否会使我的商业代码易于向公众发布?

NO. You don't have to release anything. You don't even have to distribute anything.

不。你不必释放任何东西。你甚至不需要分发任何东西。

If you ever distribute your program to someone, you must give (to this person only) the source code, and give full freedom to modify and distribute it under the same license.

如果您曾经将您的程序分发给某人,您必须(仅向此人)提供源代码,并在同一许可下给予修改和分发它的完全自由。

Distributing something under GPL or using GPL libraries in your code doesn't force you to create a website and put your program for everybody in the world.

在 GPL 下分发某些内容或在您的代码中使用 GPL 库并不会强迫您创建网站并将您的程序提供给世界上的每个人。

回答by Alex Martelli

IANAL, etc etc, but:

IANAL 等,但是:

The Free Software Foundation has consistently claimed that software linked to a library covered by GPL is a derived work, and thus needs to be covered by GPL itself (indeed, that's the main difference of the LGPL license). I don't know how the situation stands in court precedents in various jurisdiction, &c, but if you don't want to risk having to litigate on the issue [which would no doubt bring costs and bad PR even if it were to ultimately succeed], it may be more prudent to avoid linking to GPL libraries (including dynamic linking) if you don't want to distribute the sources to your code.

自由软件基金会一直声称链接到 GPL 涵盖的库的软件是衍生作品,因此需要由 GPL 本身涵盖(实际上,这是 LGPL 许可证的主要区别)。我不知道在不同司法管辖区的法庭判例中情况如何,等等,但是如果你不想冒险就这个问题提起诉讼[这无疑会带来成本和糟糕的公关,即使它最终成功],如果您不想将源代码分发给您的代码,则避免链接到 GPL 库(包括动态链接)可能更为谨慎。

回答by Convict

Some suggestions:

一些建议:

  • Seek proper legal advice.
  • Contact the authors of the libraries. Ask them:
    • Their opinion of you using their software in your application;
    • If they'd enter a commerical agreement with you for your application;
    • About other ways that they may be prepared to work with you.
  • 寻求适当的法律建议。
  • 联系库的作者。问问他们:
    • 他们对您在应用程序中使用他们的软件的看法;
    • 如果他们就您的申请与您达成商业协议;
    • 关于他们可能准备与您合作的其他方式。

回答by SingleNegationElimination

If your software can be used without any loss of functionality without the use of the GPLed code, then you are in pretty good shape. Many non-free programs make use of the readline library, where available, but do not have it enabled by default, so that they can benefit from it's presence but not run afoul of its license. If those projects had chosen to require the readline library for line editing, then they would fall under the scope of the GPL and would be subject to its terms.

如果您的软件可以在不使用 GPL 代码的情况下使用而不会丢失任何功能,那么您的状态非常好。许多非自由程序使用 readline 库(如果可用),但默认情况下没有启用它,以便它们可以从它的存在中受益,但不会违反其许可证。如果这些项目选择需要 readline 库进行行编辑,那么它们将属于 GPL 的范围并受其条款的约束。

回答by the_drow

As far as I know the GPL license is free for open sourced projects.
Most libraries provide the option to buy a commercial license for commercial use.
Contact the library's author.

据我所知,GPL 许可证对于开源项目是免费的。
大多数图书馆都提供购买商业许可证以供商业使用的选项。
联系图书馆的作者。

This is taken from Wt's website:

这是摘自Wt的网站:

Wt may be used using either the GPL or a Commercial License.

If you wish to use the library using the GNU General Public License (GPL), you may build a web application with Wt, and deploy it to your own intranet or Internet web server, for any purpose, without the requirement to make the source code freely available.

Note that if you are passing on your web application in binary form, be it selling or giving away for free, then you must include the source code, as per terms of the GPL. This also applies to redistribution of the Wt library, in original or modified form.

The Commercial License has no such limitations. Please visit our Licensing information page for license terms, pricing and ordering.

Wt 可以使用 GPL 或商业许可证使用。

如果您希望使用 GNU 通用公共许可证 (GPL) 的库,您可以使用 Wt 构建一个 Web 应用程序,并将其部署到您自己的内部网或 Internet Web 服务器,出于任何目的,无需制作源代码免费提供。

请注意,如果您以二进制形式传递您的 Web 应用程序,无论是出售还是免费赠送,那么您必须根据 GPL 条款包含源代码。这也适用于原始或修改形式的 Wt 库的重新分发。

商业许可证没有这样的限制。请访问我们的许可信息页面,了解许可条款、定价和订购信息。

回答by Eric O Lebigot

You might want to check HOWTO: Pick an open source licenseand its second installment. It gives you a decision tree that suggests a license for programmers, and gives details about specific situations. These articles are also quite clear.

您可能需要查看HOWTO:选择开源许可证及其第二部分。它为您提供了一个决策树,为程序员建议许可证,并提供有关特定情况的详细信息。这些文章也说得很清楚。