Licenses for contributed code#

Matplotlib only uses BSD compatible code. If you bring in code fromanother project make sure it has a PSF, BSD, MIT or compatible license(see the Open Source Initiativelicenses page for details on individuallicenses). If it doesn't, you may consider contacting the author andasking them to relicense it. GPL and LGPL code are not acceptable inthe main code base, though we are considering an alternative way ofdistributing L/GPL code through an separate channel, possibly atoolkit. If you include code, make sure you include a copy of thatcode's license in the license directory if the code's license requiresyou to distribute the license with it. Non-BSD compatible licensesare acceptable in Matplotlib toolkits (e.g., basemap), but make sure youclearly state the licenses you are using.

Why BSD compatible?#

The two dominant license variants in the wild are GPL-style andBSD-style. There are countless other licenses that place specificrestrictions on code reuse, but there is an important difference to beconsidered in the GPL and BSD variants. The best known and perhapsmost widely used license is the GPL, which in addition to granting youfull rights to the source code including redistribution, carries withit an extra obligation. If you use GPL code in your own code, or linkwith it, your product must be released under a GPL compatiblelicense. i.e., you are required to give the source code to otherpeople and give them the right to redistribute it as well. Many of themost famous and widely used open source projects are released underthe GPL, including linux, gcc, emacs and sage.

The second major class are the BSD-style licenses (which includes MITand the python PSF license). These basically allow you to do whateveryou want with the code: ignore it, include it in your own open sourceproject, include it in your proprietary product, sell it,whatever. python itself is released under a BSD compatible license, inthe sense that, quoting from the PSF license page:

ThereisnoGPL-like"copyleft"restriction.Distributingbinary-onlyversionsofPython,modifiedornot,isallowed.Thereisnorequirementtoreleaseanyofyoursourcecode.YoucanalsowriteextensionmodulesforPythonandprovidethemonlyinbinaryform.

Famous projects released under a BSD-style license in the permissivesense of the last paragraph are the BSD operating system, python andTeX.

There are several reasons why early Matplotlib developers selected aBSD compatible license. Matplotlib is a python extension, and wechoose a license that was based on the python license (BSDcompatible). Also, we wanted to attract as many users and developersas possible, and many software companies will not use GPL code insoftware they plan to distribute, even those that are highly committedto open source development, such asenthought, out of legitimate concern that use of theGPL will "infect" their code base by its viral nature. In effect, theywant to retain the right to release some proprietary code. Companiesand institutions who use Matplotlib often make significantcontributions, because they have the resources to get a job done, evena boring one. Two of the Matplotlib backends (FLTK and WX) werecontributed by private companies. The final reason behind thelicensing choice is compatibility with the other python extensions forscientific computing: ipython, numpy, scipy, the enthought tool suiteand python itself are all distributed under BSD compatible licenses.

On this page