diff --git a/flit_core/flit_core/config.py b/flit_core/flit_core/config.py index e8e18c50..e1e55b91 100644 --- a/flit_core/flit_core/config.py +++ b/flit_core/flit_core/config.py @@ -65,7 +65,7 @@ class ConfigError(ValueError): default_license_files_globs = ['COPYING*', 'LICEN[CS]E*', 'NOTICE*', 'AUTHORS*'] -license_files_allowed_chars = re.compile(r'^[\w\-\.\/\*\?\[\]]+$') +license_files_allowed_chars = re.compile(r'^[\w\-\.\/\*\?\[\] ]+$') def read_flit_config(path): diff --git a/flit_core/tests_core/samples/pep621_license_files/Third-Party Notices.md b/flit_core/tests_core/samples/pep621_license_files/Third-Party Notices.md new file mode 100644 index 00000000..e69de29b diff --git a/flit_core/tests_core/test_config.py b/flit_core/tests_core/test_config.py index eaf6dd3a..5270696c 100644 --- a/flit_core/tests_core/test_config.py +++ b/flit_core/tests_core/test_config.py @@ -380,6 +380,8 @@ def test_license_expr_error_unsupported_with(invalid_expr: str): ({'license-files': ["**/LICENSE*"]}, ["LICENSE", "module/vendor/LICENSE_VENDOR"]), ({'license-files': ["module/vendor/LICENSE*"]}, ["module/vendor/LICENSE_VENDOR"]), ({'license-files': ["LICENSE", "module/**/LICENSE*"]}, ["LICENSE", "module/vendor/LICENSE_VENDOR"]), + # It was decided the banning spaces was an oversight + ({'license-files': ["Third-Party Notices.md"]}, ["Third-Party Notices.md"]), # Add project.license.file + match default patterns ({'license': {'file': 'module/vendor/LICENSE_VENDOR'}}, ["LICENSE", "module/vendor/LICENSE_VENDOR"]), ])