Skip to content

Commit

Permalink
LGPL, slight restructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed Sep 19, 2023
1 parent 1664e00 commit 1653b9c
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 47 deletions.
48 changes: 1 addition & 47 deletions lib/python/qmk/cli/license_check.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,7 @@
import re
from pathlib import Path
from milc import cli

LICENSE_TEXTS = [
(
'GPL-2.0-or-later', [
"""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
""", """\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
"""
]
),
('GPL-2.0-only', ["""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2.
"""]),
(
'GPL-3.0-or-later', [
"""\
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
""", """\
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of
the License, or any later version.
"""
]
),
('GPL-3.0-only', ["""\
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, version 3.
"""]),
('Apache-2.0', ["""\
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
"""]),
]
from qmk.constants import LICENSE_TEXTS

L_PAREN = re.compile(r'\(\[\{\<')
R_PAREN = re.compile(r'\)\]\}\>')
Expand Down
123 changes: 123 additions & 0 deletions lib/python/qmk/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,126 @@
#
################################################################################
'''

LICENSE_TEXTS = [
(
'GPL-2.0-or-later', [
"""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
""", """\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
"""
]
),
('GPL-2.0-only', ["""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2.
"""]),
(
'GPL-3.0-or-later', [
"""\
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
""", """\
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of
the License, or any later version.
"""
]
),
('GPL-3.0-only', ["""\
This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, version 3.
"""]),
(
'LGPL-2.1-or-later', [
"""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
""", """\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or any later version.
""", """\
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
""", """\
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or any later version.
"""
]
),
(
'LGPL-2.1-only', [
"""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; version 2.1.
""", """\
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; version 2.1.
"""
]
),
(
'LGPL-3.0-or-later', [
"""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
""", """\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 3
of the License, or any later version.
""", """\
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
""", """\
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 3
of the License, or any later version.
"""
]
),
(
'LGPL-3.0-only', [
"""\
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; version 3.
""", """\
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; version 3.
"""
]
),
('Apache-2.0', ["""\
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
"""]),
]

0 comments on commit 1653b9c

Please sign in to comment.