If I run a GPLv2 Python script that generates some code and use the code in my app, is it considered a “derivative” work? [closed]

StackOverflow https://stackoverflow.com/questions/12005326

  •  26-06-2021
  •  | 
  •  

Pergunta

For example I'd like to use this Python script: Generic Perfect Hash Generator to generate a perfect hash function.

But I'm a bit confused: if I use the code it'd produce and redistribute the script along with the program's source code, should I distribute my program under the terms of GPL as well (currently it's under Apache 2.0)?

Foi útil?

Solução

IANAL aside:

It depends. If the output of the program contains significant portions of constants defined in the generator's source verbatim, then those portions are also under GPL, and consequently, any program you incorporate them in must also be under GPL.

However, the license terms for code generators often explicitly exclude the program's output from the GPL terms; bison, for example, takes this route. After all, the protected stubs are not usually very interesting nor do they contribute to the resulting codebase in an important way.

You could consult a lawyer for legal advice, but a cheaper (and more promising) route is to just ask the author for clarification. Most likely, if there is no exemption, the author simply didn't think of it being a problem, and just released it under standard GPL without giving it much thought.

Outras dicas

This is covered in the GPL FAQ here: https://www.gnu.org/licenses/gpl-faq.html#WhatCaseIsOutputGPL

So as far as the GNU people are concerned, the matter is settled. A lawyer might disagree of course.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top