From e991c4d45460c09e5eaee6cb1041edb95d1e990e Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 13 Dec 2023 11:38:41 -0800 Subject: Use SPDX-License-Identifier consistently This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field --- docs/genrefman.py | 14 +------------- docs/genrelnotes.py | 15 ++------------- docs/jsonvalidator.py | 2 +- docs/refman/generatorbase.py | 12 +----------- docs/refman/generatorjson.py | 2 +- docs/refman/generatormd.py | 13 +------------ docs/refman/generatorpickle.py | 13 +------------ docs/refman/generatorprint.py | 13 +------------ docs/refman/generatorvim.py | 2 +- docs/refman/jsonschema.py | 2 +- docs/refman/loaderbase.py | 13 +------------ docs/refman/loaderpickle.py | 2 +- docs/refman/loaderyaml.py | 13 +------------ docs/refman/main.py | 13 +------------ docs/refman/model.py | 13 +------------ 15 files changed, 16 insertions(+), 126 deletions(-) (limited to 'docs') diff --git a/docs/genrefman.py b/docs/genrefman.py index 2510ec590..f3a4e3da7 100755 --- a/docs/genrefman.py +++ b/docs/genrefman.py @@ -1,19 +1,7 @@ #!/usr/bin/env python3 - +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Hack to make relative imports to mlog possible from pathlib import Path import sys diff --git a/docs/genrelnotes.py b/docs/genrelnotes.py index bad659725..7cc9dcb17 100755 --- a/docs/genrelnotes.py +++ b/docs/genrelnotes.py @@ -1,18 +1,7 @@ #!/usr/bin/env python3 - +# SPDX-License-Identifier: Apache-2.0 # Copyright 2019 The Meson development team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. + ''' Generates release notes for new releases of Meson build system ''' diff --git a/docs/jsonvalidator.py b/docs/jsonvalidator.py index 1b2c6377c..46d6167ba 100755 --- a/docs/jsonvalidator.py +++ b/docs/jsonvalidator.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# SPDX-License-Identifer: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team import argparse diff --git a/docs/refman/generatorbase.py b/docs/refman/generatorbase.py index 08ce4920d..054180a18 100644 --- a/docs/refman/generatorbase.py +++ b/docs/refman/generatorbase.py @@ -1,16 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. from abc import ABCMeta, abstractmethod import typing as T diff --git a/docs/refman/generatorjson.py b/docs/refman/generatorjson.py index a2edc184a..4c9807370 100644 --- a/docs/refman/generatorjson.py +++ b/docs/refman/generatorjson.py @@ -1,4 +1,4 @@ -# SPDX-License-Identifer: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team from __future__ import annotations diff --git a/docs/refman/generatormd.py b/docs/refman/generatormd.py index 79029c1d5..2c80ab023 100644 --- a/docs/refman/generatormd.py +++ b/docs/refman/generatormd.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from .generatorbase import GeneratorBase import re import json diff --git a/docs/refman/generatorpickle.py b/docs/refman/generatorpickle.py index 364a9886d..19e416ef9 100644 --- a/docs/refman/generatorpickle.py +++ b/docs/refman/generatorpickle.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - import pickle from pathlib import Path from .generatorbase import GeneratorBase diff --git a/docs/refman/generatorprint.py b/docs/refman/generatorprint.py index d80529603..b1ed37558 100644 --- a/docs/refman/generatorprint.py +++ b/docs/refman/generatorprint.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from .generatorbase import GeneratorBase from .model import ReferenceManual, Object, Function, DataTypeInfo, Type, ObjectType diff --git a/docs/refman/generatorvim.py b/docs/refman/generatorvim.py index ea725740f..9cdb9b27b 100644 --- a/docs/refman/generatorvim.py +++ b/docs/refman/generatorvim.py @@ -1,4 +1,4 @@ -# SPDX-License-Identifer: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0 # Copyright 2023 The Meson development team from __future__ import annotations diff --git a/docs/refman/jsonschema.py b/docs/refman/jsonschema.py index 283d3a2d9..e8ace7891 100644 --- a/docs/refman/jsonschema.py +++ b/docs/refman/jsonschema.py @@ -1,4 +1,4 @@ -# SPDX-License-Identifer: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team import typing as T diff --git a/docs/refman/loaderbase.py b/docs/refman/loaderbase.py index e64134f55..39c92bf09 100644 --- a/docs/refman/loaderbase.py +++ b/docs/refman/loaderbase.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from abc import ABCMeta, abstractmethod from pathlib import Path import re diff --git a/docs/refman/loaderpickle.py b/docs/refman/loaderpickle.py index 722fedf05..8e7a25f56 100644 --- a/docs/refman/loaderpickle.py +++ b/docs/refman/loaderpickle.py @@ -1,4 +1,4 @@ -# SPDX-License-Identifer: Apache-2.0 +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team from pathlib import Path diff --git a/docs/refman/loaderyaml.py b/docs/refman/loaderyaml.py index e7ec57a7e..15ba5909d 100644 --- a/docs/refman/loaderyaml.py +++ b/docs/refman/loaderyaml.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from .loaderbase import LoaderBase from .model import ( Type, diff --git a/docs/refman/main.py b/docs/refman/main.py index 9a3d16a61..f6cdf49e7 100644 --- a/docs/refman/main.py +++ b/docs/refman/main.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from pathlib import Path import argparse import typing as T diff --git a/docs/refman/model.py b/docs/refman/model.py index 0c65c5835..51d4ca24a 100644 --- a/docs/refman/model.py +++ b/docs/refman/model.py @@ -1,17 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 # Copyright 2021 The Meson development team -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from dataclasses import dataclass, field from enum import Enum import typing as T -- cgit v1.2.3