diff --git a/src/hatch_build_scripts/plugin.py b/src/hatch_build_scripts/plugin.py index b8b6aea..78b9350 100644 --- a/src/hatch_build_scripts/plugin.py +++ b/src/hatch_build_scripts/plugin.py @@ -64,7 +64,7 @@ def initialize( src_file = work_dir / work_file out_file = out_dir / work_file log.debug("Copying %s to %s", src_file, out_file) - if src_file not in created: + if src_file not in created and src_file != out_file: out_file.parent.mkdir(parents=True, exist_ok=True) shutil.copyfile(src_file, out_file) shutil.copystat(src_file, out_file)