My software is a compiled Python module, which provides commands when loaded into the interpreter.

In the project, the source code and accompanying Python scripts are using the Apache Software License 2.0.

I would like for the compiled module to now be LGPL Version 3. Any accompanying example scripts would still be under the Apache Software License, Version 2.

Apart from clearly marking each C++ or Python file with the appropriate license statement. I would note the dual license in the documentation, NOTICE and README files.

Are there other projects with a similar approach? Are there other best practices I should consider?

  • 1
    It is not entirely clear what you want to do. Do you intend that the sources for the compiled module are available under both the LGPL and Apache licenses? If I clone your repository, should I be able to create a binary that is released under the Apache license? Or is it your intention that the compiled module is always under the LGPL and the example scripts are under the Apache license? Commented Jun 29, 2020 at 8:39
  • @BartvanIngenSchenau The compiled module sources would be under the LGPL. All of the python scripts would be under the ASL.
    – Juan
    Commented Jun 29, 2020 at 19:36

2 Answers 2


The term "dual licensing" describes the situation where the entire repository is available under two (or more) licenses and the user gets to choose which license terms they want to comply to.

What you have, based on your comments, is different in that you have different licenses that apply to different parts of the repository. This is not very common, but it is not rare either, although it is usually used to give different licenses to the code and assets, like images or icons.

You have already described the best practices here:

  • In the documentation make it clear that different files are under different licenses
  • In each file clearly indicate which license applies to it.

The only thing I would add to that is to organize your files in the repository in such a way that a visitor, after reading about the different licenses in the documentation, can make a reasonable guess for each file which license it is under without having to open up the file itself. This could, for example, be achieved by putting all example scripts that are under the Apache license together in an examples folder.


I doubt if there is a point for releasing the compiled module under the more restricting LGPL license. Users can just receive the source code under Apache license 2.0 and compile it by themselves. The resulting binary will be under Apache license too.

I think it would be better if you use the same license for both source code and compiled modules, like LGPL. Python scripts can be licensed under a separate license of your choice.

  • 2
    How does this even try to answer the question? Commented Jul 4, 2020 at 14:11

Your Answer

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

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