Use of GPLed Python extension modules

Tim Churches tchur at optushome.com.au
Sat Nov 22 16:31:22 EST 2003


On Sun, 2003-11-23 at 02:52, Jp Calderone wrote:
> On Sat, Nov 22, 2003 at 05:37:38PM +0800, kk wrote:
> > Paul Rubin wrote:
> > > Tim Churches <tchur at optushome.com.au> writes:
> > > 
> > >>If a compiled Python extension module B includes code from some
> > >>other software A which is licensed only under the GPL, do other
> > >>Python programmes, C, which import module B also need to be licensed
> > >>under a GPL-compatible license (assuming C is/are to be distributed
> > >>to third parties)?
> > > 
> > > 
> > > It's not enough for B and C to be under "GPL-compatible licenses".
> > > They have to be under the actual GPL.
> > > 
> > > From http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL
> > > 
> > >     You have a GPL'ed program that I'd like to link with my code to build
> > >     a proprietary program. Does the fact that I link with your program
> > >     mean I have to GPL my program?
> > > 
> > >             Yes. 
> > AFAIK, ur python program, which is interpreted, is considered data in
> > view of the program interpreter. So the GPL license is not needed.
> > Correct me if I am wrong.
> 
>   I'm pretty sure that's wrong.

So am I, at least on the basis of the following paragraphs from the GPL
FAQ ( http://www.fsf.org/licenses/gpl-faq.html#MereAggregation )

<begin quote>
"What is the difference between "mere aggregation" and "combining two
modules into one program"?
Mere aggregation of two programs means putting them side by side on the
same CD-ROM or hard disk. We use this term in the case where they are
separate programs, not parts of a single program. In this case, if one
of the programs is covered by the GPL, it has no effect on the other
program. 
Combining two modules means connecting them together so that they form a
single larger program. If either part is covered by the GPL, the whole
combination must also be released under the GPL--if you can't, or won't,
do that, you may not combine them.
What constitutes combining two parts into one program? This is a legal
question, which ultimately judges will decide. We believe that a proper
criterion depends both on the mechanism of communication (exec, pipes,
rpc, function calls within a shared address space, etc.) and the
semantics of the communication (what kinds of information are
interchanged).
If the modules are included in the same executable file, they are
definitely combined in one program. If modules are designed to run
linked together in a shared address space, that almost surely means
combining them into one program.
By contrast, pipes, sockets and command-line arguments are communication
mechanisms normally used between two separate programs. So when they are
used for communication, the modules normally are separate programs. But
if the semantics of the communication are intimate enough, exchanging
complex internal data structures, that too could be a basis to consider
the two parts as combined into a larger program."<end quote>

Importing a GPLed Python module into the Python namespace seems like a
fairly intimate kind of communication. Personally I doubt that it makes
much difference whether it is Python bytecode which is being combined
and run under the same instance of the Python VM, or compiled machine
code which is being run on the microcode of the CPU chip (and what if
you use Psyco?).

But I am most interested to hear arguments to the contrary.

-- 

Tim C

PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
or at http://members.optushome.com.au/tchur/pubkey.asc
Key fingerprint = 8C22 BF76 33BA B3B5 1D5B  EB37 7891 46A9 EAF9 93D0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20031123/2caef0c1/attachment.sig>


More information about the Python-list mailing list