From e0d95cc164d1b5121ef41f79bfdc8920af565a72 Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Tue, 30 Mar 2021 21:20:05 +1100 Subject: [PATCH] Make _copy_dir for <= 3.7 create dst if needed This matches the behaviour of the implementation used on Python 3.8+. Co-Authored-By: Toby Peterson --- install/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/__init__.py b/install/__init__.py index cfd96aa..79d5096 100644 --- a/install/__init__.py +++ b/install/__init__.py @@ -84,6 +84,8 @@ def _copy_dir(src, dst, ignore=[]): # type: (str, str, List[str]) -> None else: def _copy_dir(src, dst, ignore=[]): # type: (str, str, List[str]) -> None + if not os.path.exists(dst): + os.makedirs(dst) from distutils.dir_util import copy_tree for node in os.listdir(src): if node in ignore: