Non GPL Python MySQL Client Library.

Mike C. Fletcher mcfletch at rogers.com
Mon Jun 28 15:40:49 EDT 2004


Christopher Weimann wrote:

>On 06/28/2004-02:40PM, Christopher T King wrote:
>  
>
>>>Is there anything like this in the Python world ?
>>>      
>>>
>>Libraries licensed under the GPL can be used without GPLing the code that 
>>uses them - you only have to GPL any extensions you make to the library. 
>>    
>>
>
>I thought that was only true of LGPL not GPL.
>  
>
Generally, yes.  The LGPL is the library which explicitly allows client 
code to use the library and be distributed with it without the client 
code being released under the GPL.  There is, however, a loophole of 
sorts for those wishing to distribute code which can use GPL libraries.  
Basically, no one can assert copyright ownership over something if it 
doesn't include (or resemble) their own code.  Code which merely *could* 
be used with a GPL library, but does not actually include any GPL code 
is likely safe from prosecution.

Because it's possible to write another library which gives the same API 
as the GPL'd code, you can quite reasonably specify that it is *that* 
(non-GPL, and potentially still planned) code to which your library is 
written.  That's likely a legal fiction (which is always dangerous in a 
court), but computer science is a field of abstracts, and the posit of 
such a library eventually being developed is a perfectly valid way to 
design and develop a system, and you would be perfectly within your 
rights under the GPL to use GPL'd code as a way to test your code until 
you've written the posited library.

The end-user, as well, can make the decision to use your code with the 
GPL version of the library.  The thing there is that the end-user 
decides to combine the GPL code with the non-GPL code (not you).  You 
need to be careful that the process is not so automatic that you are 
*effectively* distributing the two packages together (and that's likely 
a blurry line, but forcing the user to download and install the package 
manually is likely well on the permissible side).  The GPL is primarily 
about limiting the rights of programmers, so it explicitly allows a 
*user* to combine GPL and non-GPL code themselves.

However, before you start doing this, (i.e. violating the spirit but not 
the letter of the license), I would strongly suggest that you look at 
the non-GPL libraries.  PostgreSQL, for instance, has a far more liberal 
license, and PyPgSQL is similarly licensed.  Their developers are quite 
happy to let you create closed-source software based on their 
work-product.  Open Source projects are primarily of benefit because of 
the developer community, and to be seen as violating the spirit of their 
community is *not* a good way to treat your suppliers.

<rant>And developers; stop GPLing libraries which are essentially 
commodities.  The GPL is effective when you are dealing with code which 
is so compelling and unique that it is easier to buy into the FSF's 
manifesto than to switch or write a substitute.  With commodity code 
(e.g. database drivers, GUI libraries) all you are doing is splitting 
the community.  Almost everyone can work on and improve LGPL libraries 
without blinking, but GPL is a PITA when working on commercial products 
and often forces reimplementation... when it's commodity code that's 
just entirely wasted effort.</rant>

Oh, and in case you're wondering, no, I don't tend to use LGPL for my 
own code.  I figure I'm giving a gift to the world, so why would I start 
attaching strings...

Caveat reader,
Mike

________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/
  blog: http://zope.vex.net/~mcfletch/plumbing/





More information about the Python-list mailing list