Skip to content

Commit 0d0d06b

Browse files
committed
Add back project.license.file to license files
1 parent 345bf1c commit 0d0d06b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

flit_core/flit_core/config.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,14 @@ def read_pep621_metadata(proj, path) -> LoadedConfig:
603603
raise ConfigError(
604604
"[project.license] should specify file or text, not both"
605605
)
606-
lc.referenced_files.append(license_tbl['file'])
606+
license_f = license_tbl['file']
607+
if isabs_ish(license_f):
608+
raise ConfigError(
609+
f"License file path ({license_f}) cannot be an absolute path"
610+
)
611+
if not (path.parent / license_f).is_file():
612+
raise ConfigError(f"License file {license_f} does not exist")
613+
license_files.add(license_tbl['file'])
607614
elif 'text' in license_tbl:
608615
pass
609616
else:

0 commit comments

Comments
 (0)