Skip to content

Commit

Permalink
Use SPDX-License-Identifier consistently
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dcbaker authored and eli-schwartz committed Dec 13, 2023
1 parent 1f82afe commit e991c4d
Show file tree
Hide file tree
Showing 246 changed files with 270 additions and 2,704 deletions.
16 changes: 1 addition & 15 deletions ci/usercustomize.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# 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.

# This script is used by coverage (see tools/run_with_cov.py) to enable coverage
# reports in python subprocesses

import coverage
coverage.process_startup()
14 changes: 1 addition & 13 deletions docs/genrefman.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 2 additions & 13 deletions docs/genrelnotes.py
Original file line number Diff line number Diff line change
@@ -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
'''
Expand Down
2 changes: 1 addition & 1 deletion docs/jsonvalidator.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 1 addition & 11 deletions docs/refman/generatorbase.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/refman/generatorjson.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
13 changes: 1 addition & 12 deletions docs/refman/generatormd.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions docs/refman/generatorpickle.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions docs/refman/generatorprint.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/refman/generatorvim.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/refman/jsonschema.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions docs/refman/loaderbase.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/refman/loaderpickle.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions docs/refman/loaderyaml.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
13 changes: 1 addition & 12 deletions docs/refman/main.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 1 addition & 12 deletions docs/refman/model.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 2 additions & 15 deletions meson.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
#!/usr/bin/env python3

# SPDX-License-Identifier: Apache-2.0
# Copyright 2016 The Meson development team
# Copyright © 2023 Intel Corporation

# 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.

# This file is an entry point for all commands, including scripts. Include the
# strict minimum python modules for performance reasons.
import sys

# Check python version before importing anything else, we might have an older
Expand Down
13 changes: 1 addition & 12 deletions mesonbuild/_pathlib.py
Original file line number Diff line number Diff line change
@@ -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.

'''
This module soly exists to work around a pathlib.resolve bug on
certain Windows systems:
Expand Down
16 changes: 2 additions & 14 deletions mesonbuild/_typing.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
# SPDX-License-Identifer: Apache-2.0
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 The Meson development team
# Copyright © 2020-2021 Intel Corporation

# 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.
# Copyright © 2020-2023 Intel Corporation

"""Meson specific typing helpers.
Expand Down
14 changes: 2 additions & 12 deletions mesonbuild/arglist.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2012-2020 The Meson development team
# Copyright © 2020 Intel Corporation
# Copyright © 2020-2023 Intel Corporation

# 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 __future__ import annotations

from functools import lru_cache
Expand Down
13 changes: 1 addition & 12 deletions mesonbuild/ast/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
# 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.

# This class contains the basic functionality needed to run any interpreter
# or an interpreter-based tool.

Expand Down
13 changes: 1 addition & 12 deletions mesonbuild/ast/interpreter.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2016 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.

# This class contains the basic functionality needed to run any interpreter
# or an interpreter-based tool.
from __future__ import annotations
Expand Down
13 changes: 1 addition & 12 deletions mesonbuild/ast/introspection.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2018 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.

# This class contains the basic functionality needed to run any interpreter
# or an interpreter-based tool

Expand Down
Loading

0 comments on commit e991c4d

Please sign in to comment.