build: fix pdm build regression

Use shutil.copytree to copy folders in the "scripts" path.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2024-01-01 05:51:09 -05:00
parent 54dc887254
commit 84a8538597
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 4 additions and 1 deletions

View File

@ -74,4 +74,7 @@ def pdm_build_initialize(context: Context) -> None:
for item in scripts_path.iterdir(): for item in scripts_path.iterdir():
if item.name == "__pycache__": if item.name == "__pycache__":
continue continue
shutil.copy2(str(item), str(scripts_dest)) if item.is_dir():
shutil.copytree(str(item), str(scripts_dest.joinpath(item.name)))
else:
shutil.copy2(str(item), str(scripts_dest))