15

I rewrote some parts of Mercurial (which is licensed under GNU GPL v2) in C#. Naturally, I looked a lot into original Python code and some parts are direct translations from Python to C#.

Is is possible have "my code" licensed under different terms or to even make a part of a closed-source commercial application? If not, can I re-license "my-code" under LGPL, open-source it and then use this open-sourced C# library in my closed-source commercial application?

3 Answers3

19

The text of the license specifically covers translations, so no, you wouldn't be able to relicense it.

The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.

Mason Wheeler
  • 83,213
0

Based upon:
http://www.gnu.org/licenses/gpl-faq.html#AllCompatibility

You should be okay with the second scenario you portrayed.

The parts you copied remain under GPLv2, but your entire library can be released as LGPL v2.1 or later. You can then link your closed source code to that library under the terms of the LGPL.

As always, do some digging and make sure you understand what the restrictions are.

0

If you created a brand new work (and you are prepared to defend this in court) that isn’t derived from the GPL licensed work then you can do whatever you like. If you created a derivative work, then you need to license it under the GPL.

It depends on how much you copied (and a mechanical rewrite would count as copying). Nothing copied, no license requirements.

gnasher729
  • 49,096