views:

839

answers:

6

This page says that py2exe is GPL licensed (bottom of the page)

My concern is that you have to distribute some of the files they generate. I think this would be allowed with LGPL, but not GPL. <--- Please address this in your answer.

My final product would not be GPL and will not give out source code.

Update: Please see my answer below, it seems py2exe is not GPL after all.

+11  A: 

The USE of py2exe doesn't require that you release the source code you're compiling.

If you CHANGE py2exe itself, then you MAY need to release your code under the GPL.

But if you're only using it to compile your own non-gpl code, you don't have to release your own code.

License

The py2exe project itself is MIT licensed. It may be more complicated than that if it also uses GPL components, but as far as releasing your own code with the py2exe compiled files you should not have an issue.

Detail

Your code is compiled to python byte code. It is NOT linked in any way shape or form with the DLLs and other files incident to a py2exe compiling.

The python...dll is the actual interpretor and IS linked to the other files.

YOUR code does NOT have to be under GPL - it's just interpreted, it's never linked to any other code.

When you distribute these files you MUST include the license info and point out the source code for all the incidental files that have GPL licenses, but you do NOT need to release your own code. Given that the project is under MIT license you may not need to do much depending on which files your project requires.

As always, check with a lawyer -

Your byte code is inserted as a resource into the EXE file that starts the interpreter and feeds it your bytecode. Given that this portion is definitely MIT license you should be fine.

However, the waters are murky if py2exe is using any GPL code. Still, unlikely to cause problems.

Note

Be aware that py2exe is a method that allows you to release python code to a windows environment without installing a python interpretor.

It is not a protection against copying, or viewing the source code - your compiled bytecode can be pulled from the EXE and presumably decompiled - your code is never converted to machine code - it's still an interpreted language.

Adam Davis
Are you sure, because I think you have to distribute some dlls with your generated exe as well. dlls that they provide.
Brian R. Bondy
The DLLs should be LGPL - but if they aren't then there may be some issues.
Adam Davis
Thanks Adam for the info about how py2exe works and thanks for the info for future GPL projects I see
Brian R. Bondy
+1  A: 

Unless I misunderstand the situation, there is nothing about the GPL which prevents it from being used in a commercial context. Is the concern here that you are effectively linking against GPLed code?

Have you asked the authors about a bison style modification to the license? (Bison is distributed with a license modification that excepts the generated code from the terms of the GPL. Still looking for a link on this...)

dmckee
The concern is that it's not LGPL and I think you are required to distribute some of the files they provide. I want to include it in a program that is not GPL and in a program that does not offer its source code.
Brian R. Bondy
+3  A: 

Unless you plan to modify parts of py2exe itself and distribute those, there is no problem with using it in a commercial product.

hillu
+6  A: 

It seems that it is not GPL after all.

The comment from Zach Scrivena:

@Brian: It says MIT License on http://sourceforge.net/projects/py2exe/ – Zach Scrivena

I guess the py2exe page mentioned in my original question should be a little more clear as it is pretty confusing.

The bottom of the py2exe home page is refering to MoinMoin which is a Wiki Engine. It does not refer to the py2exe project itself.

Brian R. Bondy
You might want to contact the MoinMoin developers and point out why putting "GPL licensed" at the bottom of their default template is confusing.
David Zaslavsky
+1  A: 

There are some GPL programs that place restrictions on the output of a program, for instance GNU Bison (at last check) did just that. GCC will also be placing restrictions on intermediate output (compiled code prior to optimizations being run) to prevent people from writing proprietary plug-ins to gcc itself.

py2exe is not one of those programs. You are under no obligation to follow the GPL when you are distributing its output. Likewise, you can feel free to modify py2exe, use it to compile and you still aren't facing GPL restrictions when distributing the final product (your compiled code).

Now, if you have modified py2exe and want to distribute your modified version of py2exe, you would be required to distribute your changes to py2exe as well.

Now, to be perfectly clear, be careful what you compile. If you are using python code that is covered by the gpl2, gpl3 or AGPL3, you MUST distribute the source code with your compiled code. However, for just this reason, most things you'll be importing will be LGPL2/3 anyway.

The GPL2/3 do not come into play until you distribute software. AGPL3 goes the extra mile by saying if you make software available for use over a network (i.e. as Google makes G-Mail available to us), you are distributing the software.

Tim Post
Bison includes a good deal of framework code in its output, and that's under the GPL, as a blend of your code and the GPLed skeleton.
David Thornley
A: 

There's also this link : http://www.py2exe.org/LICENSE.txt

Raj