I am building a software which I plan to release with Apache 2.0 License and some components are code based from a repository released with MIT License.

  1. MIT License states: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." I understand that I should copy the whole license including copyright "(c) Creator-of-code", but WHERE should I put it? In a separate LICENSE file? or in the code itself?

  2. If, for example, I put the original MIT license in the code, how then shall I put my own copyright, based on Apache 2.0 License? Will the following be valid?


    # Copyright 2018 one_who_modified_the_original_code
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # See the License for the specific language governing permissions and
    # limitations under the License.

    # MIT License
    # Copyright (c) 2016 creator_of_original_code
    # Permission is hereby granted, free of charge, to any person obtaining a copy

  • Did you make changes to the parts that you copied from the repository with the MIT license? Or do you use it unchanged. Sep 25, 2018 at 17:15
  • @BartvanIngenSchenau I did some changes in the copied code.
    – cjbayron
    Sep 26, 2018 at 0:03

1 Answer 1


Your suggested approach is correct:

  1. Always keep any existing copyright and license notices intact.

  2. If you made non-trivial changes, you may add your own copyright and license notices.

This holds both for copyright headers at the top of each file, and for a project-level license file.

Further tips:

  • It is customary to order notices in reverse chronological order so that the newest information is at the top.

  • The project's license must comply with the licenses of all source files. If different files have different licenses or files are subject to multiple licenses, all of that should be summarized in the project-level license document.

  • When there are multiple licenses, users have to comply with all of them. With respect to existing licenses, you are also a user. For the MIT license, this just boils down to including the existing copyright notices and the MIT license text (both in source files with such notices, and the project level license document).

  • When the project is under both the MIT and Apache license, then it is sufficient to call your project Apache 2 licensed: the terms of the Apache license are a superset of the MIT license terms. However, you still have to keep any existing MIT license notices intact.

  • You may have to comply with notice requirements, especially if you also publish the software in non-source forms. E.g. by default Python's “wheel” or “sdist” format for installable modules does not include any LICENSE or NOTICE files. This would strip away any notices in the license document. You should therefore either explicitly set the license_file or data_files metadata field, or add the notices to the long_description metadata field (typically taken from a README file).

For an exceptional license document of a project that went through multiple license changes and includes third-party code, consider the Python license. The document starts with an overview (which unfortunately isn't 100% clear about the copyright status), then provides a list of apliccable licenses. Some of those include a copyright notice. Finally, the licenses of all included third party software are shown.

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.