8

I am working on python library that wraps a non-free C library. In order to develop this, I referenced the C library's copyrighted documentation. Because of that my function and variable names are the same as the non-free library's.

Am I still okay to apply an open source license to my library?

EDIT: My question is not whether I can use the C api, but whether using that api's documentation will violate the documentations copyright. I am not replacing or reverse engineering the copyrighted api, but an exposing that api's functions to a python library.

  • 2
    This basically boils down to the question "can an API be copyrighted". This is the central question of the Oracle vs. Google lawsuit regarding Google copying the API of Java in Android. – Philipp Jul 28 '15 at 20:52
  • @Philipp in that case, here is an extremely related question: opensource.stackexchange.com/questions/762/… – Zizouz212 Jul 28 '15 at 22:12
  • 2
    @Philipp, maybe, but my question isn't so much asking "Can I use their API?" as it is "Can information gained from documentation be copyrighted?" I'm coming from the basis of Chinese wall development: en.wikipedia.org/wiki/Chinese_wall#Reverse_engineering – David DeGraw Jul 28 '15 at 22:39
  • @DavidDeGraw since the landmark Oracle vs. Google case, AFAIK this hasn't been further tested in a court of law. The question is not off-topic here, but I suspect that the good folks over at law.stackexchange.com The question comes down to if in implementation of an API based on documentation is a derivative work. And I fear the answer is that it's never been tested, so nobody really knows. – Martijn Jul 28 '15 at 22:58
  • Can you make your code FLOSS if you referenced the MSDN docs? Of course you can! – curiousdannii Jul 29 '15 at 0:25
3

TL;DR Yes, you can use a permissive Open Source license for this wrapper program, but not a strong copyleft Open Source license.


First, to clear up something that has been raised in comments: As it is written I do not believe your question is about reverse engineering a non-free C library.

You say:

I am working on python library that wraps a non-free C library. In order to develop this, I referenced the C library's copyrighted documentation. Because of that my function and variable names are the same as the non-free library's.

I take this to mean that your python wrapper makes the functions and variables of the non-free C-library available for use in some python program that uses your wrapper to "bridge" the python program and the non-free C library.

You don't mention the terms the non-free C library is made available under, but I am going to assume that it is All Rights Reserved (ARR), or at least under terms that does not allow redistribution alone or as part of a derivative work.

If this is what this question is about, then I do not believe the Appeals court's May 9, 2014 decision in Oracle vs Google apply. This case was predominantly about reverse engineering, and the court ruled that the structure, sequence and organization of the 37 API files Google had copied (in order to make existing software that was based up Oracle's Java API simpler to port to Android.) was copyrightable. Because Google reused this in a competing product, Google was guilty of copyright infringement.

You have not copied an API, nor is your wrapper a derivative work of the API.

You've written a Python library wrapper that uses the documented API to a non-free C library in order to provide functional integration between python and said non-free library. Since making it possible for programmers to use API functions and variables is the whole point of documenting an API, using the documented API as intended does not infringe the copyright of the API, even if the API itself is copyrightable.

So you're allowed to do create a distribute this program without infringing copyright.

Let's first assume you release your wrapper as ARR, with an explicit permission to combine the wrapper with the library. Will this create problems? For instance, can you be sued if you do this?

This is not legal advice, but my opinion is that the answer is: "no".

You cannot distribute the non-free C library of course, so by itself, your wrapper will no do anything. Python developers who want to use this have obtain a legal a copy of both an combine them themselves.

Having first determined that this is legal if you distribute your program as ARR, let's move on and see if you can also do it if your wrapper carry a permissive Open Source license, such as MIT (Expat)

Again, I see no problems. Python developers who want to use this have obtain a legal a copy of both an combine them themselves. However. the resulting derivative work can not be distributed, because the the terms of the non-free C-library does not allow it.

However, I do not believe you can distribute your wrapper under a strong copyleft license such as GPLv2 or GPLv3.

If you did this, nobody could legally link your wrapper with the non-free library, because the resulting derivative1 work would had be made available under GPL, and this is of course incompatible with the C-library being ARR.

1) This is based upon the FSF's interpretation of linking. This interpretation is not universally accepted, but since there are plenty of other questions about this, I will no go into that discussion here.

  • Thank you! Your explanation is clear and makes sense to me. – David DeGraw Jul 29 '15 at 17:38
  • I believe GCC is under the GPL with a linking exception. You might be able to adapt that exception to fit your use case. But I think that might violate the FSF's copyright on the GPL itself, since the license says "...but changing it is not allowed." – Kevin Aug 4 '15 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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