views:

506

answers:

6

Hello all,

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?

+6  A: 

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.

Alex Martelli
... and avoid writing the code in python (since it's hard and cumbersome to distribute python programs without source code)
nosklo
It's neither hard nor cumbersome with the latest version of PyInstaller (built from SVN trunk) -- see e.g. http://www.pycon.it/static/stuff/slides/distribuire-programmi-python-con-pyinstaller.pdf (don't worry, it's in English!-) and let's all lobby the new PyInstaller developers to fully document and release their new shiny version!-) Of course bytecode can be examined (much like that made from Java, C#, etc -- or the machine code made from C-) but that's less of an issue.
Alex Martelli
A: 

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.

the_drow
It's not "free for open sourced projects" in general - it says that derivative works have to be licensed under the GPL specifically. Just making the source available under another license isn't adequate.
Peter
Then how can they sell it?I suggested his company to contact the author so they can buy a commercial license.
the_drow
The term "commercial" is misleading. GPL license is also "commercial", in the sense that you can buy/sell software licensed by it. Maybe what you want is a "proprietary" license (as opposed to "free as in speech" license). If the "beer" is free or not plays no part.
nosklo
+1  A: 

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.

TokenMacGuy
+2  A: 

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.
Convict
+8  A: 

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.

nosklo
Well put, and thanks all for clarifying!
Raj
of course, nothing is keeping that person you gave it to from putting your program up on your web for everybody in the world.
Aaron
A: 

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.

EOL