Skip to content

Commit 2b4e365

Browse files
authored
Replace distutils usage with non-deleted alternatives
1 parent 07e03d3 commit 2b4e365

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Diff for: scripts/build_scripts/build_testapps.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
from absl import app
8585
from absl import flags
8686
from absl import logging
87-
from distutils import dir_util
8887

8988
import utils
9089
import config_reader
@@ -322,8 +321,7 @@ def _build(
322321
project_dir = os.path.join(project_dir, output_testapp_dir)
323322

324323
logging.info("Copying testapp project to %s", project_dir)
325-
os.makedirs(project_dir)
326-
dir_util.copy_tree(testapp_dir, project_dir)
324+
shutil.copytree(testapp_dir, project_dir)
327325

328326
logging.info("Changing directory to %s", project_dir)
329327
os.chdir(project_dir)

Diff for: scripts/build_scripts/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
platforms.
2020
"""
2121

22-
import distutils.spawn
2322
import platform
2423
import shutil
2524
import subprocess
@@ -62,7 +61,7 @@ def run_command(cmd, capture_output=False, cwd=None, check=False, as_root=False,
6261

6362
def is_command_installed(tool):
6463
"""Check if a command is installed on the system."""
65-
return distutils.spawn.find_executable(tool)
64+
return shutil.which(tool)
6665

6766

6867
def delete_directory(dir_path):

0 commit comments

Comments
 (0)