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

Question:

We’re evaluating a couple of Python libraries for Graph manipulation. We tried ‘networkx’ (http://networkx.lanl.gov/) and ‘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).

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

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

Thanks,
Raj

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

Asked By: ragebiswas

||

Answers:

IANAL, etc etc, but:

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.

Answered By: Alex Martelli

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.

This is taken from Wt‘s website:

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.

Answered By: the_drow

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.

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.
Answered By: Convict

IANAL, but:

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

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,

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

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.

Answered By: nosklo

You might want to check HOWTO: Pick an open source license and 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.

Answered By: Eric O Lebigot
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.