From 4d4efac796f3c1f355de8d925daa26b69263abd3 Mon Sep 17 00:00:00 2001 From: Mehmet Samet Duman Date: Thu, 2 Apr 2026 21:11:23 +0300 Subject: NOISSUE Add various license files and update REUSE configuration Signed-off-by: Mehmet Samet Duman --- tomlplusplus/tools/generate_conformance_tests.py | 4 ++-- tomlplusplus/tools/generate_single_header.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tomlplusplus') diff --git a/tomlplusplus/tools/generate_conformance_tests.py b/tomlplusplus/tools/generate_conformance_tests.py index 0da53ffb8a..7b2b3cf095 100755 --- a/tomlplusplus/tools/generate_conformance_tests.py +++ b/tomlplusplus/tools/generate_conformance_tests.py @@ -541,7 +541,7 @@ def write_test_file(name, all_tests): test_file_path = Path(utils.entry_script_dir(), '..', 'tests', rf'conformance_{sanitize(name.strip())}.cpp').resolve() with StringIO() as test_file_buffer: write = lambda txt,end='\n': print(txt, file=test_file_buffer, end=end) - +# REUSE-IgnoreStart # preamble write(r'// This file is a part of toml++ and is subject to the the terms of the MIT license.') write(r'// Copyright (c) Mark Gillard ') @@ -551,7 +551,7 @@ def write_test_file(name, all_tests): write(r'// this file was generated by generate_conformance_tests.py - do not modify it directly') write(r'') write(r'#include "tests.hpp"') - +# REUSE-IgnoreEnd # test data write(r'') write('namespace') diff --git a/tomlplusplus/tools/generate_single_header.py b/tomlplusplus/tools/generate_single_header.py index fed4ae4e1e..f2fd875a74 100755 --- a/tomlplusplus/tools/generate_single_header.py +++ b/tomlplusplus/tools/generate_single_header.py @@ -97,8 +97,10 @@ def main(): toml_h = re.sub('([^ \t])[ \t]+\n', r'\1\n', toml_h) # explicit 'strip this' blocks toml_h = re.sub(r'(?:\n[ \t]*)?//[#!][ \t]*[{][{].*?//[#!][ \t]*[}][}].*?\n', '\n', toml_h, flags=re.S) + # REUSE-IgnoreStart # spdx license identifiers toml_h = re.sub(r'^\s*//\s*SPDX-License-Identifier:.+?$', '', toml_h, 0, re.I | re.M) + # REUSE-IgnoreEnd # double blank lines toml_h = re.sub('\n(?:[ \t]*\n[ \t]*)+\n', '\n\n', toml_h) # magic comments @@ -148,10 +150,12 @@ def main(): # build the preamble (license etc) preamble = [] +# REUSE-IgnoreStart preamble.append(rf''' // toml++ v{version} // https://github.com/marzer/tomlplusplus // SPDX-License-Identifier: MIT''') +# REUSE-IgnoreEnd preamble.append(r''' // - THIS FILE WAS ASSEMBLED FROM MULTIPLE HEADER FILES BY A SCRIPT - PLEASE DON'T EDIT IT DIRECTLY - // -- cgit 0.0.5-2-1-g0f52