From 953d07406409017f3e3b4acd247e2ff7e0e1383e Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Sat, 12 Sep 2020 10:56:58 -0500 Subject: [PATCH] Tidying up license-line-checking --- .efrocachemap | 2 +- Makefile | 21 +----- assets/Makefile | 20 +---- .../ba_data/python/bastd/activity/__init__.py | 21 +----- .../ba_data/python/bastd/actor/__init__.py | 21 +----- .../src/ba_data/python/bastd/game/__init__.py | 21 +----- .../ba_data/python/bastd/keyboard/__init__.py | 21 +----- .../ba_data/python/bastd/mapdata/__init__.py | 21 +----- .../ba_data/python/bastd/session/__init__.py | 21 +----- .../ba_data/python/bastd/ui/coop/__init__.py | 21 +----- .../python/bastd/ui/profile/__init__.py | 21 +----- .../python/bastd/ui/settings/__init__.py | 21 +----- .../python/bastd/ui/soundtrack/__init__.py | 21 +----- .../ba_data/python/bastd/ui/store/__init__.py | 21 +----- tests/test_ba/__init__.py | 21 +----- tests/test_efro/__init__.py | 21 +----- tools/batools/updateproject.py | 74 +++++++------------ tools/efrotools/__init__.py | 13 +--- 18 files changed, 47 insertions(+), 356 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 0027084b..7308b3c3 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3939,5 +3939,5 @@ "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/a0/7f/587e6a6d3dece7669d09bd042701", "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ad/4c/7b78e4c0a2e65a62fee7e38e34e7", "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c4/f8/1f8eee280877672da222c3397429", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/74/c7/dc173d3207f3ff2912093d28de98" + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/61/a7/7b8d223cef9f48fb58de41607009" } \ No newline at end of file diff --git a/Makefile b/Makefile index 8e682f73..a844f13b 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,5 @@ -# Copyright (c) 2011-2020 Eric Froemling +# Released under the MIT License. See LICENSE for details. # -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ------------------------------------------------------------------------------ - # This Makefile encompasses most high level functionality you should need when # working with Ballistica. These build rules are also handy as reference or a # starting point if you need specific funtionality beyond that exposed here. diff --git a/assets/Makefile b/assets/Makefile index e1bd6ec3..93161fbf 100644 --- a/assets/Makefile +++ b/assets/Makefile @@ -1,23 +1,5 @@ -# Copyright (c) 2011-2020 Eric Froemling +# Released under the MIT License. See LICENSE for details. # -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - ################################################################################ # # # Asset Generation # diff --git a/assets/src/ba_data/python/bastd/activity/__init__.py b/assets/src/ba_data/python/bastd/activity/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/activity/__init__.py +++ b/assets/src/ba_data/python/bastd/activity/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/actor/__init__.py b/assets/src/ba_data/python/bastd/actor/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/actor/__init__.py +++ b/assets/src/ba_data/python/bastd/actor/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/game/__init__.py b/assets/src/ba_data/python/bastd/game/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/game/__init__.py +++ b/assets/src/ba_data/python/bastd/game/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/keyboard/__init__.py b/assets/src/ba_data/python/bastd/keyboard/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/keyboard/__init__.py +++ b/assets/src/ba_data/python/bastd/keyboard/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/mapdata/__init__.py b/assets/src/ba_data/python/bastd/mapdata/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/mapdata/__init__.py +++ b/assets/src/ba_data/python/bastd/mapdata/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/session/__init__.py b/assets/src/ba_data/python/bastd/session/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/session/__init__.py +++ b/assets/src/ba_data/python/bastd/session/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/ui/coop/__init__.py b/assets/src/ba_data/python/bastd/ui/coop/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/ui/coop/__init__.py +++ b/assets/src/ba_data/python/bastd/ui/coop/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/ui/profile/__init__.py b/assets/src/ba_data/python/bastd/ui/profile/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/ui/profile/__init__.py +++ b/assets/src/ba_data/python/bastd/ui/profile/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/ui/settings/__init__.py b/assets/src/ba_data/python/bastd/ui/settings/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/ui/settings/__init__.py +++ b/assets/src/ba_data/python/bastd/ui/settings/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/ui/soundtrack/__init__.py b/assets/src/ba_data/python/bastd/ui/soundtrack/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/ui/soundtrack/__init__.py +++ b/assets/src/ba_data/python/bastd/ui/soundtrack/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/assets/src/ba_data/python/bastd/ui/store/__init__.py b/assets/src/ba_data/python/bastd/ui/store/__init__.py index 32622553..867b1714 100644 --- a/assets/src/ba_data/python/bastd/ui/store/__init__.py +++ b/assets/src/ba_data/python/bastd/ui/store/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/tests/test_ba/__init__.py b/tests/test_ba/__init__.py index 32622553..867b1714 100644 --- a/tests/test_ba/__init__.py +++ b/tests/test_ba/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/tests/test_efro/__init__.py b/tests/test_efro/__init__.py index 32622553..867b1714 100644 --- a/tests/test_efro/__init__.py +++ b/tests/test_efro/__init__.py @@ -1,20 +1 @@ -# Copyright (c) 2011-2020 Eric Froemling -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# ----------------------------------------------------------------------------- +# Released under the MIT License. See LICENSE for details. diff --git a/tools/batools/updateproject.py b/tools/batools/updateproject.py index 93db6216..414739a1 100755 --- a/tools/batools/updateproject.py +++ b/tools/batools/updateproject.py @@ -67,7 +67,7 @@ class Updater: self._file_changes: Dict[str, str] = {} self._license_line_checks = bool( - getlocalconfig(Path('.')).get('license_line_checks', False)) + getlocalconfig(Path('.')).get('license_line_checks', True)) def run(self) -> None: """Do the thing.""" @@ -351,12 +351,15 @@ class Updater: for fname in fnames: with open(fname) as infile: makefile = infile.read() - if get_legal_notice_private() not in makefile: - raise RuntimeError(f'Priv legal not found in {fname}') if self._public: public_license = get_public_license('makefile') if public_license not in makefile: - raise RuntimeError(f'Pub license not found in {fname}') + raise CleanError(f'Pub license not found in {fname}.') + else: + if (get_legal_notice_private() not in makefile + and get_public_license('makefile') not in makefile): + raise CleanError( + f'Priv or pub legal not found in {fname}.') def _check_python_file(self, fname: str) -> None: from efrotools import get_public_license, PYVER @@ -391,60 +394,37 @@ class Updater: if self._license_line_checks: public_license = get_public_license('python') private_license = '# ' + get_legal_notice_private() - - # (Sanity check: public license's first line should be - # same as priv) - # if line != public_license.splitlines()[0]: - # raise RuntimeError( - # 'Public license first line should match priv.') - lnum = copyrightline if len(lines) < lnum + 1: raise RuntimeError('Not enough lines in file:', fname) - # if lines[lnum] != private_license: - # # Allow auto-correcting if it looks close already - # # (don't want to blow away an unrelated line) - # # allow_auto = 'Copyright' in lines[ - # # lnum] and 'Eric Froemling' in lines[lnum] - # allow_auto = False - # self._add_line_correction(fname, - # line_number=lnum, - # expected=private_license, - # can_auto_update=allow_auto) - # found_intact_private = False - # else: - # found_intact_private = True + disable_note = ('NOTE: You can disable license line' + ' checks by adding "license_line_checks": false\n' + 'to the root dict in config/localconfig.json.\n' + 'see https://ballistica.net/wiki' + '/Knowledge-Nuggets#' + 'hello-world-creating-a-new-game-type') if self._public: # Check for public license only. if lines[lnum] != public_license: - raise RuntimeError( - f'Found incorrect license text in {fname};' - f' please correct.') + raise CleanError(f'License text not found' + f" at '{fname}' line {lnum+1};" + f' please correct.\n' + f'Expected text is: {public_license}\n' + f'{disable_note}') else: + # Check for public or private license. if (lines[lnum] != public_license and lines[lnum] != private_license): - raise RuntimeError( - f'Found incorrect license text in {fname};' - f' please correct.') - - # # Try to be reasonably certain it's not in here... - # definitely_have_full = public_license in contents - # might_have_full = ('Permission is hereby granted' in contents - # or 'THE SOFTWARE IS PROVIDED' in contents) - - # # Only muck with it if we're not sure we've got it. - # if not definitely_have_full: - # if found_intact_private and not might_have_full: - # self._add_line_correction(fname, - # line_number=lnum, - # expected=public_license, - # can_auto_update=True) - # else: - # raise RuntimeError( - # f'Found incorrect license text in {fname};' - # f' please correct.') + raise CleanError(f'License text not found' + f" at '{fname}' line {lnum+1};" + f' please correct.\n' + f'Expected text (for public files):' + f' {public_license}\n' + f'Expected text (for private files):' + f' {private_license}\n' + f'{disable_note}') def _check_python_files(self) -> None: from pathlib import Path diff --git a/tools/efrotools/__init__.py b/tools/efrotools/__init__.py index daed12bd..6fac48dc 100644 --- a/tools/efrotools/__init__.py +++ b/tools/efrotools/__init__.py @@ -84,27 +84,22 @@ def set_config(projroot: Path, config: Dict[str, Any]) -> None: def get_public_license(style: str) -> str: - """Return the MIT license as used for our public facing stuff. + """Return the license notice as used for our public facing stuff. 'style' arg can be 'python', 'c++', or 'makefile, or 'raw'. """ - raw = MIT_LICENSE if style == 'raw': - return raw + return 'Released under the MIT License. See LICENSE for details.' if style == 'python': # Add a line at the bottom since our python-formatters tend to smush # our code up against the license; this keeps things a bit more # visually separated. return '# Released under the MIT License. See LICENSE for details.' - #return ('\n'.join('#' + (' ' if l else '') + l - # for l in raw.splitlines()) + '\n' + '# ' + '-' * 77) if style == 'makefile': # Basically same as python except without the last line. - return ('\n'.join('#' + (' ' if l else '') + l - for l in raw.splitlines())) + return '# Released under the MIT License. See LICENSE for details.' if style == 'c++': - return '\n'.join('//' + (' ' if l else '') + l - for l in raw.splitlines()) + return '// Released under the MIT License. See LICENSE for details.' raise RuntimeError(f'Invalid style: {style}')