GPL and Python modules.

Grant Edwards grante at visi.com
Mon Oct 25 14:08:01 EDT 2004


On 2004-10-25, Michael Sparks <zathras at thwackety.com> wrote:

>> "import someGPLdmodule"
>>
>> Makes my _source_code_ a derived work, and therefore must be
>> GPL'd?  That just doesn't sound right.
>
> Depends. If you pull in and use a specific GPL module, then yes, it is
> GPL'd. If you don't distribute said GPL module, and you can show
> reasonable doubt whether:
>
>    import foo
>
> imports the GPL foo or the non-GPL foo

Placing that line in my source code does neither.  It's an
instruction to the Python VM which will *at some point in the
future* import that module.

> (say 2 files both independently implemented to a common test
> suite for a standard), then it's much more woolley.
>
> After all if "foo" on the target system is from (say) a BSD'd
> implementation and your code uses that, then your code isn't GPL
> (obviously). If "foo" on the target system is (say) a GPL'd
> implementation and your code uses that, then your code does have
> to be GPL.

But, my souce code doesn't include or contain _either_ of the
foo modules.  The import doesn't happen until the program is
run.

> Put another way, if your code is shipped in the py2exe bundle
> with GPL'd code and your code will not run without it, then
> its a derivative work in the terms of the GPL.

Possibly.  That depends on whether you view what py2exe does as
"linking the two" or "mere aggregation".  AFAIK, there is no
linkage between the two .pyc modules until runtime.
Zipping/tarring up my .pyc module with a GPL'd module seems to
me to be pretty much what's described as "mere aggregation" --
except for the fact that my module isn't useful without the
GPL'd module.

However, what if my code is shipped without the GPL'd code.
What if I ship my souce (or a compiled module) alone.  Is it a
derived work do solely to the fact that the user will at some
point in the future use my my .pyc with a GPL'd module?

> However you can still hit this if the py2exe bundle has to use
> GPL'd code even if you don't distribute it - for example if
> it's the only implementation that python will bind the names
> to at run time because the only implementation available is
> GPL.
>
> (These issues are generally why the LGPL was created in the
> first place if you're going HUH???!!?!)

Yup.

-- 
Grant Edwards                   grante             Yow!  Will it improve my
                                  at               CASH FLOW?
                               visi.com            



More information about the Python-list mailing list