GPL and Python modules.

Tim Churches tchur at optushome.com.au
Tue Oct 26 00:37:35 CEST 2004


On Tue, 2004-10-26 at 01:16, Grant Edwards wrote:
> Let's say I use a GPL'd python module (e.g. something installed
> in site-packages) in an application.
> 
> Let's also say I use py2exe to package and distribute said
> application.
> 
> Is what I'm distributing a "derived work" of the GPL'd python?
> Or is py2exe's packaging of the module's .pyc file and my
> application code's .pyc files a "mere aggregation" so that I
> only have to provide source code for the GPL'ed module and not
> for my application code?

See the GPL FAQ at
http://www.fsf.org/licenses/gpl-faq.html#MereAggregation :

<quote from above URL>
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.
</quote>

Thus, if you combine your code with GPLed code using py2exe, the GPL
clearly applies. If you import GPLed Python code into the same namespace
as your code, the GPL clearly applies. If your code calls a GPLed Python
module via an "intimate" RPC mechanism like PyRO, then the GPL may
applies (but it is not so clear-cut). If your code calls GPLed code via
a less intimate mechanism, like XML-RPC or HTTP, the GPL clearly doesn't
apply. If your code and GPL code are just on the same disc, the GPL
clearly doesn't apply.
-- 

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






More information about the Python-list mailing list