licenses.py 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # ALL LICENSES: VARS = year, developer
  4. #------------------------------------------------------------------------------
  5. # [ apache_license ]
  6. # The Apache License
  7. #------------------------------------------------------------------------------
  8. apache_license = """
  9. Copyright {{year}} {{developer}}
  10. Licensed under the Apache License, Version 2.0 (the "License");
  11. you may not use this file except in compliance with the License.
  12. You may obtain a copy of the License at
  13. http://www.apache.org/licenses/LICENSE-2.0
  14. Unless required by applicable law or agreed to in writing, software
  15. distributed under the License is distributed on an "AS IS" BASIS,
  16. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. See the License for the specific language governing permissions and
  18. limitations under the License.
  19. """
  20. #------------------------------------------------------------------------------
  21. # [ bsd_license ]
  22. # The BSD 2-clause license
  23. #------------------------------------------------------------------------------
  24. bsd_license = """
  25. Copyright (c) {{year}}, {{developer}}
  26. All rights reserved.
  27. Redistribution and use in source and binary forms, with or without
  28. modification, are permitted provided that the following conditions are met:
  29. * Redistributions of source code must retain the above copyright notice, this
  30. list of conditions and the following disclaimer.
  31. * Redistributions in binary form must reproduce the above copyright notice,
  32. this list of conditions and the following disclaimer in the documentation
  33. and/or other materials provided with the distribution.
  34. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  35. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  36. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  37. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  38. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  39. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  40. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  41. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  42. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  43. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  44. """
  45. #------------------------------------------------------------------------------
  46. # [ gpl3_license ]
  47. # The GPL v3 License
  48. #------------------------------------------------------------------------------
  49. gpl3_license = """
  50. Copyright (C) {{year}} {{developer}}
  51. This program is free software: you can redistribute it and/or modify
  52. it under the terms of the GNU General Public License as published by
  53. the Free Software Foundation, either version 3 of the License, or
  54. (at your option) any later version.
  55. This program is distributed in the hope that it will be useful,
  56. but WITHOUT ANY WARRANTY; without even the implied warranty of
  57. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  58. GNU General Public License for more details.
  59. You should have received a copy of the GNU General Public License
  60. along with this program. If not, see [http://www.gnu.org/licenses/].
  61. """
  62. #------------------------------------------------------------------------------
  63. # [lgpl_license ]
  64. # The Lesser GPL license
  65. #------------------------------------------------------------------------------
  66. lgpl_license = """
  67. Copyright (C) {{year}} {{developer}}
  68. This library is free software; you can redistribute it and/or
  69. modify it under the terms of the GNU Lesser General Public
  70. License as published by the Free Software Foundation; either
  71. version 2.1 of the License, or (at your option) any later version.
  72. This library is distributed in the hope that it will be useful,
  73. but WITHOUT ANY WARRANTY; without even the implied warranty of
  74. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  75. Lesser General Public License for more details.
  76. You should have received a copy of the GNU Lesser General Public
  77. License along with this library; if not, write to the Free Software
  78. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
  79. USA
  80. """
  81. #------------------------------------------------------------------------------
  82. # [ mit_license ]
  83. # The MIT License
  84. #------------------------------------------------------------------------------
  85. mit_license = """
  86. The MIT License (MIT)
  87. Copyright (c) {{year}} {{developer}}
  88. Permission is hereby granted, free of charge, to any person obtaining a copy of
  89. this software and associated documentation files (the "Software"), to deal in
  90. the Software without restriction, including without limitation the rights to
  91. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  92. the Software, and to permit persons to whom the Software is furnished to do so,
  93. subject to the following conditions:
  94. The above copyright notice and this permission notice shall be included in all
  95. copies or substantial portions of the Software.
  96. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  97. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  98. FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  99. COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  100. IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  101. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  102. """
  103. #------------------------------------------------------------------------------
  104. # [ mozilla_license ]
  105. # The Mozilla Public license, v2.0
  106. #------------------------------------------------------------------------------
  107. mozilla_license = """
  108. Mozilla Public License, v.2.0
  109. Copyright (c) {{year}} {{developer}}
  110. This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0.
  111. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
  112. """