Skip to content

Commit 0fbca72

Browse files
committed
Remove the use of deprecated distutils. Issue mbucko#13
1 parent 608dd30 commit 0fbca72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

install.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import shutil
55
import subprocess
66

7-
from distutils import dir_util
87

98
if os.name == "nt":
109
default_prefix = "C:\\Program Files"
@@ -79,7 +78,7 @@ def installOpenLeetCode(src_dir, install_dir):
7978
if not os.path.exists(data_dir):
8079
raise FileNotFoundError(f"No data directory found at {data_dir}")
8180

82-
dir_util.copy_tree(data_dir, install_dir)
81+
shutil.copytree(data_dir, install_dir, dirs_exist_ok=True)
8382

8483
schema_file = os.path.join(src_dir, "src", "schema", "results_validation_schema.json")
8584
if not os.path.exists(schema_file):

0 commit comments

Comments
 (0)