3

Can I use other licenses(e.g. MIT) for a library that

  • has the same API as a GPL library, but
  • does not import the GPL nor a snippet of code from it

What I am actually doing

I will use Blender python API(mainly bpy) as an example.

I am using bpy to develop my addons. but since this is an API, it will only work in a launched blender, making it difficult to use the IDEs.

So I am planning to make a fake-bpy module written in blender. For example, bpy.ops.objects.add_primitive_cube will add a cube in the real bpy while this will simply print("cube added")

This has nothing to do with the actual code in blender, just happens to have the same modules, functions and so on.

Being a GPL program is a GPL too. But what about my fake-bpy?

1 Answer 1

6

I believe that technically, unless you use a "clean room" recreation of the API calls, your project should fall under the GPL terms. If you use blender or its source in any way to re-create the function definitions for your code, then you are copying GPL code.

Also note that an addon or script that uses the blender API falls under the GPL terms, as noted in blenders FAQ :-

If you share or publish Python scripts – if they use the Blender API calls – have to be made available compliant to the GNU GPL as well.

so as any script that uses the API falls under GPL, there is no real benefit to not using the GPL for the project.

Having said that, what you are planning has been done, and uses an MIT license in the project.

Also of note is that you don't have to make a fake module. While it is not officially supported, blenders build system includes a setting to build blender as a python module, this contains no GUI functionality but otherwise works the same as running blender in the background. This module can be imported into IDEs and external python instances for code completion and testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.