8

General description:

Can I create Python software that will dynamically link against a closed-source library that has a C API (the Python interpreter is not copyleft) and will also utilize a GPL licensed Python library? It's not clear to me how exactly the GPL applies here given that calling a GPL'd Python library is not quite the same thing as dynamically linking to GPL'd software written in a compiled language.

Context:

I want to enable communication between a GPL'd system written in Python and a closed-source system written in a compiled language. The closed-source system provides a proprietary interprocess communication (IPC) library for extensibility. I plan to create a Python interface for this IPC library with the aim to 1. allow the GPL'd Python system to be called from the closed-source one 2. allow the closed-source system to be called from the GPL'd Python one.

Note: I understand that the GPL restrictions refer to distribution. For all the "can I..." questions in this post, assume that I want to distribute ready-to-use (i.e. compiled when applicable) software.

5

Let's break the question into two steps.

  1. Can I create [and distribute] Python software that will dynamically link against a closed-source library that has a C API (the Python interpreter is not copyleft).

This should cause no problem.

The fact that the software is designed to be linked to some closed-source library, imposes no constraint on it.

Your software is your software. You may give it any license you like, and distribute it as you want.

  1. and will also utilize a GPL licensed Python library?

This step is slightly more complex.

Using this library means that the combination of your software, closed-source library, and the GPL licensed Python library, means that the composite of all three must, if distributed, be licensed under GPL (some may disagree, but let's for the sake of argument assume that this is effect of the GNU GPL).

This clearly rules out distributing a project where all three components are included, as the license of GNU GPL library is incompatible with including a closed source library.

However, the fact that your software is written for the specific purpose of making all these (license-wise incompatible) components interoperate cannot impose any restrictions on how you choose to use your creative powers.

I.e. the mere existence of a legal tool know as the "GNU GPL" cannot in any way constrain what you create.

The GNU GPL can impose terms on what you distribute. If what you distribute includes a component licensed under the GNU GPL, then you're bound by the terms of the license.

This also means that if you don't distribute any component licensed under the GNU GPL, then you're not bound by the terms of the license.

So: Provided you don't distribute anything else along with your Python software, but just provide instructions to your downstream users about how to find (buy?) the closed-source library, and the GPL licensed Python library, and the steps they need to go through to assemble the these components into a working composite, then you don't have to care about the GPL.

Now, what about your users? Given the scenario described above, they will now be able to take your software, separately acquire the closed-source library, and the GPL licensed Python library, and take the steps required to assemble the complete project into a functional piece of software.

Are the users breaking the GPL? No, not as long as they don't distribute the completed project. The private use exception of the GNU GPL (and copyright law) makes the user's use of all the components legal.

Are you subverting the GNU GPL by doing it this way? IMHO, no. The GNU GPL is essentially about freedom. The GNU GPL was not written to restrict people from using closed source software in their projects.

  • On the contrary, many would say it was written to restrict people from using closed source software. GPL is about freedom of the software, not the developer. – RubberDuck Aug 28 '15 at 0:45
  • This is a late comeback to your answer, still I’d like to hear your voice on it: Does this work the other way round, too? Consider a proprietary application X built on a GPL’d library Y. Could they simply claim "For our software to work, you need to install X, but you also need to get Y from over there and install it."? – Jonas Schäfer Oct 6 '16 at 6:48
  • @JonasWielicki Yes. For example, you could write a proprietary application that requires the user to install Linux (GPL licensed); this is often done. You could also require that the user has installed the GNU Readline library (GPL licensed) in their GNU/Linux distribution (I'm not sure how often this is done, but since most distributions include Readline, it would not be impractical to rely on it). Since you aren't distributing either of those things (Linux, Readline), the GPL licenses of those packages does not affect you. – Brandin Jun 28 '18 at 15:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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