From 912572e04a6fe15c515c005847f054c989d5e6f1 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Tue, 25 Feb 2020 16:01:58 +0100 Subject: [PATCH] Only copy if file exists (not if installed from sdist etc.) --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d850a74ac..d9021836f 100755 --- a/setup.py +++ b/setup.py @@ -133,8 +133,9 @@ def setup_package(): exec(f.read(), about) for copy_file, target_dir in COPY_FILES.items(): - shutil.copy(str(copy_file), str(target_dir)) - print(f"Copied {copy_file} -> {target_dir}") + if copy_file.exists(): + shutil.copy(str(copy_file), str(target_dir)) + print(f"Copied {copy_file} -> {target_dir}") include_dirs = [ get_python_inc(plat_specific=True),