1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Replaced distutils to shutil when copying files in a tree

This commit is contained in:
Andrey Senyaev
2021-12-10 11:46:27 +03:00
parent 9bcb006ec7
commit 4d3cf77ad5
2 changed files with 13 additions and 2 deletions
+7 -1
View File
@@ -9,7 +9,13 @@ import io
from shutil import copyfile
from pprint import pformat
from string import Template
from distutils.dir_util import copy_tree
if sys.version_info >= (3, 8): # Python 3.8+
from shutil import copytree
def copy_tree(src, dst):
copytree(src, dst, dirs_exist_ok=True)
else:
from distutils.dir_util import copy_tree
try:
from io import StringIO # Python 3