From df26bb676c942100b004d70b62b80b2c3d5018c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 14 Oct 2025 00:16:11 +0200 Subject: [PATCH] Replace obsoleted Python `distutils.dir_util.copy_tree` by `shutil.copytree` --- bcl.py | 4 ++-- desktop.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bcl.py b/bcl.py index 8571ac6..37fbe04 100755 --- a/bcl.py +++ b/bcl.py @@ -132,10 +132,10 @@ def make_product(opts: BclOpts, product: str): run_command('make', args=test_make_args, name='make tests') # Copy the bcl profiles to the output directory - from distutils.dir_util import copy_tree + from shutil import copytree for profile in profiles: profile_dir = get_profile_dir(profile, product) - copy_tree('%s/mcs/class/lib/%s' % (opts.mono_source_root, profile_dir), '%s/%s' % (install_dir, profile_dir)) + copytree('%s/mcs/class/lib/%s' % (opts.mono_source_root, profile_dir), '%s/%s' % (install_dir, profile_dir)) # Remove unneeded files import glob diff --git a/desktop.py b/desktop.py index 250abc3..7ddb082 100755 --- a/desktop.py +++ b/desktop.py @@ -231,13 +231,13 @@ def make(opts: DesktopOpts, product: str, target_platform: str, target: str): strip_libs(opts, product, target_platform, target) def copy_bcl(opts: DesktopOpts, product: str, target_platform: str, target: str): - from distutils.dir_util import copy_tree + from shutil import copytree from bcl import get_profile_install_dirs dest_dir = path_join(opts.install_dir, '%s-%s-%s' % (product, target, opts.configuration), 'lib/mono/4.5') for src_dir in get_profile_install_dirs(opts, 'desktop-win32' if target_platform == 'windows' else 'desktop'): if not os.path.isdir(src_dir): raise BuildError('BCL source directory does not exist: %s. The BCL must be built prior to this.' % src_dir) - copy_tree(src_dir, dest_dir) + copytree(src_dir, dest_dir) def clean(opts: DesktopOpts, product: str, target_platform: str, target: str): rm_rf(