-2

I want to create a public github repository of a library/software.

This library/software depends on other software/libraries (e.g. matplotlib for python projects).

How do I choose a license for my github project? Does it depend on the licenses of the used software/libraries I use for my library/software? How to make sure I choose a correct license?

3
  • Oh, this is not a forum to ask a license question for open-source software? Where else should I ask this question?
    – Alex
    Sep 13 at 13:43
  • As for matplotlib, the statement in the documentation is that the code of the library itself only uses BSD-compatible licensed code, and the BSD license is considered a permissive (i.e. non-copyleft) license. So that basically means you can license your code in whatever way you want, as long as you respect the BSD license conditions, which are easy to fulfill.
    – Brandin
    Sep 16 at 7:58
  • That documentation page also discusses the reason for only accepting BSD-compatible code in matplotlib, and not accepting GPL or LGPL code, so maybe it's interesting to read it for an overview on one point of view.
    – Brandin
    Sep 16 at 8:00

1 Answer 1

2

How do I choose a license for my github project?

You decide whether you want:

  • A copyleft license, meaning that anyone using your software must also release their code under an open source license.
  • A permissive license, meaning that your software can be used in non-open source software.

While a vast number of open source licenses exist, unless you have very specialised needs you would generally be recommended to use one of:

  • Copyleft: GNU General Public License (GPL) or GNU Affero General Public License (AGPL). The difference between the two is in whether accessing the software over a network allows the user access to the source code.
  • Permissive: one of Apache 2.0, MIT or BSD (2 clause or 3 clause) licenses. These are effectively very similar; Apache 2.0 is much wordier and may potentially cover some edge cases that the other licenses don't.

Does it depend on the licenses of the used software/libraries I use for my library/software?

Yes. If any of your dependencies are under a copyleft license, your software must be as well.

4
  • Thanks for this answer, but how do I know if a license is copyleft or permissive? Is there a list somewhere? When the used libraries are under licenses BSD, PSF, LGPL-3, Apache, MIT and Mozilla, what can I choose in that case...?
    – Alex
    Sep 14 at 5:46
  • 2
    @Alex Before you decide for a license, I recommend you start studying the basics. I recommend this and this to start. Sep 14 at 6:56
  • To study a license does not help. None of these pages tell you what to do if you have dependencies, as asked in my question. Can I choose just whatever license I want if my project uses e.g. matplotlib? Or do I have to consider the license of matplotlib itself? Where is that explained?
    – Alex
    Sep 15 at 5:50
  • @Alex If you include matplotlib (or something else) in your project, then you always have to consider the license. Matplotlib, as a specific example, is permissively licensed, so that means they specifically chose license conditions that permit you to use it in all sorts of ways (e.g. in closed source projects as well as in other open source projects). But you still have to fulfill the license conditions of the license stated. BSD license requires that you include the copyright and license notice in the source code or in the documentation for a binary release.
    – Brandin
    Sep 16 at 8:03

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.