0

From the BSD license:

Copyright (c) , All rights reserved.

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

I'm working on an open source project and want to use other open source code, published under the BSD license.

Now, as far as I understand this, the license requires me to mention these open source libraries.

Where do I have to mention it? Do I mention it in the readme? Do I mention it in the part where I import the external libraries/use the code?

  • I think this question needs more information. Are you planning on distributing the source code for this BSD-licensed software? Are you planning on distributing any binaries (e.g. a shared library or an executable with the BSD code statically linked in) that were created by using the BSD-licensed open source code? Or are you simply borrowing code snippets from the BSD-licensed code? – airfishey Dec 5 '17 at 20:13
  • Also, are you sure this a BSD license? I could definitely be wrong, but I believe the BSD license variants usually mention requirements around binary distribution in addition to the requirements around source distribution. A link to the open source code that you plan to use (not your code, but the code you depend on) would be helpful. – airfishey Dec 5 '17 at 21:40
3

You don't necessarily. The key phrase here is "redistributions of source code".

Redistributing Source

You're redistributing the source code if you take the library's code, copy it into your project (maybe in its own directory or package), and publish your project's code. Git submodules are a good example of this - having a Git submodule in your public GitHub project is a redistribution of source code.

If this is what you're doing, then you must leave any licenses in the library's code untouched. This includes license files (LICENSE, LICENSE.txt, LICENSE.md etc) as well as notices in source files.

This does not apply if you're only redistributing binaries of the library, such as DLLs or executables. These are object code, not source code, so they don't count as source redistribution and you don't have to leave the copyright notice. There may, however, be other requirements surrounding distribution of object form - check the full license.

Not Redistributing Source

If you're not redistributing the code of the library (for example, your code depends on the library but specifies its dependency in a requirements file - pip's requirements.txt convention or a Gemfile are good examples of this), then you don't have to follow the requirements above. Including a kickback to the library is still a good thing to do, though, especially if it's a major part of your project. You're free to choose the format of this, though a link in your README is a pretty widespread method.

  • While I fully agree with your analysis based on the information that the OP gave, I believe the BSD license variants usually included some requirements around displaying copyright information for binary distributions. I like your suggestion of referencing the open source library that was used even when it is not a requirement of the license. This is a good answer – airfishey Dec 5 '17 at 21:38
  • 1
    Aye, there may well be other requirements around object form, @airfishey. I will admit to not looking up the license before posting this. I'll add a note about that. – ArtOfCode Dec 5 '17 at 21:48

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.