5

If I translate/port a repository from one programming language to another, do I need to use the license file (Github) from that original project? Or can I use my own license file.

I intend to use the exact same license, however, I would like to change the name(s) inside the license file. I of course fully intend to credit the original project and it's developers, but this is my first major project and I want to get the license stuff right.

The code repository that I translated from, uses an MIT License.

My code is not a complete copy of the original code, but I've used some of the same variable names, and some of the code structures. Though I am using a different language and framework, so there are some major differences.

Or should I just keep the original license file and simply add my name and year above the original person like this?

Copyright (c) 2018 ProGamerGov

Copyright (c) 2015 Person Name
6

When you port a project to a different programming language, it is quite likely still a derivative work. This is especially the case when you (fully or in part) copy the structure of the code, and particular expressions of the same ideas. You can therefore only publish your code if you follow the license.

The MIT license is very liberal. So while you must still keep the original license around to credit the original authors, you can choose almost any license you like. In the simplest case, you can keep the MIT license and add a line with your copyright, as you suggested.

Example using the same license:

Copyright 2018 <Your Name>
Copyright 2015 <Original Author Name>

<Original License text>

Example using a different license, or the same license:

<Your Software is a program that does this and that.>

Copyright 2018 <Your Name>

<Your License text>

---

<Your Software> was ported from <Original Software>:

Copyright 2015 <Original Author Name>

<Original License text>

You can put the original license in the same file, or put the original license in a separate file like <ORIGINAL_SOFTWARE>_LICENSE.txt, and reference it from your license. Especially for the short MIT license, I would prefer to keep in in the same file to reduce confusion. For longer licenses such as the GPL or Apache licenses, I would create a LICENSE file that contains the copyright statements and notes the licenses, but refers to separate files for the full license text.

I'd like to note that different projects use LICENSE files differently. If we want to be pedantic, there is a difference between the license, and the text with the full licensing conditions. The actual license is the part that explains which licensing conditions apply to this project. Some projects put the license into the README and the conditions into a LICENSE file, others put the license and full conditions into the LICENSE files, while some put the license into the LICENSE file and the conditions into a separate file. A few projects include a file with licensing conditions, but do not make it clear that the copyright holders have in fact licensed the project under these conditions.

  • The project I am porting the code from, is this project: github.com/jcjohnson/neural-style. As far as I can tell, it looks like the license is in the LICENSE file. – ProGamerGov Apr 10 '18 at 20:01
  • What do you mean by this: "while you must still keep the original license around to credit the original authors, you can choose almost any license you like" Did you mean keep the copyright notice but change the license? – Brandin Apr 11 '18 at 13:11
  • 1
    @Brandin Yes. As the MIT license from the original project requires that you keep the license notice intact, you have to show it somewhere. But as long as you keep doing that, you can choose a different license for the derivative project. – amon Apr 12 '18 at 7:55

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.