diff options
| -rw-r--r-- | build_scripts/main.py | 10 | ||||
| -rw-r--r-- | build_scripts/utils.py | 4 | ||||
| -rw-r--r-- | coin_build_instructions.py | 4 | ||||
| -rw-r--r-- | coin_test_instructions.py | 4 | ||||
| -rw-r--r-- | testing/wheel_tester.py | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index e1eae52c4..3c456c342 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -9,7 +9,7 @@ import sys import time from packaging.version import parse as parse_version from pathlib import Path -from shutil import which, copytree, rmtree +from shutil import which, copytree from textwrap import dedent # PYSIDE-1760: Pre-load setuptools modules early to avoid racing conditions. @@ -41,7 +41,7 @@ from .qtinfo import QtInfo from .utils import (copydir, copyfile, detect_clang, filter_match, get_numpy_location, get_python_dict, init_msvc_env, linux_fix_rpaths_for_library, macos_fix_rpaths_for_library, - platform_cmake_options, rmtree, run_process, + platform_cmake_options, remove_tree, run_process, run_process_output, update_env_path) from .versions import PYSIDE, PYSIDE_MODULE, SHIBOKEN from .wheel_override import get_bdist_wheel_override, wheel_module_exists @@ -445,7 +445,7 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): # and 'pyside6' inside the 'package_for_wheels' directory. if _dst.exists(): log.warn(f'***** Found directory "{_dst}", removing it first.') - rmtree(_dst) + remove_tree(_dst) try: # This should be copied because the package directory @@ -564,7 +564,7 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): if not OPTION["REUSE_BUILD"]: log.info(f"Deleting module build folder {module_build_dir}...") try: - rmtree(module_build_dir) + remove_tree(module_build_dir) except Exception as e: log.error(f'***** problem removing "{module_build_dir}"') log.error(f'ignored error: {e}') @@ -930,7 +930,7 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): if os.path.isdir(self.st_build_dir): log.info(f"Removing {self.st_build_dir}") try: - rmtree(self.st_build_dir) + remove_tree(self.st_build_dir) except Exception as e: log.warn(f'***** problem removing "{self.st_build_dir}"') log.warn(f'ignored error: {e}') diff --git a/build_scripts/utils.py b/build_scripts/utils.py index 6a8eaa054..dd3f4e9e7 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -366,7 +366,7 @@ def make_file_writable_by_owner(path): os.chmod(path, current_permissions | stat.S_IWUSR) -def rmtree(dirname, ignore=False): +def remove_tree(dirname, ignore=False): def handle_remove_readonly(func, path, exc): excvalue = exc[1] if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES: @@ -1282,7 +1282,7 @@ def configure_cmake_project(project_path, f"Configure args were:\n {cmd_string}") if clean_temp_dir: - rmtree(build_path) + remove_tree(build_path) return output diff --git a/coin_build_instructions.py b/coin_build_instructions.py index e52bec45c..553bfa895 100644 --- a/coin_build_instructions.py +++ b/coin_build_instructions.py @@ -10,7 +10,7 @@ import sys from build_scripts.options import has_option, log, option_value from build_scripts.utils import (expand_clang_variables, get_ci_qtpaths_path, get_qtci_virtualEnv, - parse_cmake_conf_assignments_by_key, rmtree, + parse_cmake_conf_assignments_by_key, remove_tree, run_instruction) log.set_verbosity(log.INFO) @@ -76,7 +76,7 @@ def call_setup(python_ver, phase): _pExe, _env, env_pip, env_python = get_qtci_virtualEnv(python_ver, CI_HOST_OS, CI_HOST_ARCH, CI_TARGET_ARCH) if phase in ["BUILD"]: - rmtree(_env, True) + remove_tree(_env, True) # Pinning the virtualenv before creating one # Use pip3 if possible while pip seems to install the virtualenv to wrong dir in some OS python3 = "python3" diff --git a/coin_test_instructions.py b/coin_test_instructions.py index 8df41eb04..e90c9e8af 100644 --- a/coin_test_instructions.py +++ b/coin_test_instructions.py @@ -6,7 +6,7 @@ import sys from build_scripts.options import has_option, log, option_value from build_scripts.utils import (expand_clang_variables, get_ci_qmake_path, - get_qtci_virtualEnv, rmtree, run_instruction) + get_qtci_virtualEnv, remove_tree, run_instruction) log.set_verbosity(log.INFO) @@ -29,7 +29,7 @@ CI_RELEASE_CONF = has_option("packaging") def call_testrunner(python_ver, buildnro): _pExe, _env, env_pip, env_python = get_qtci_virtualEnv(python_ver, CI_HOST_OS, CI_HOST_ARCH, CI_TARGET_ARCH) - rmtree(_env, True) + remove_tree(_env, True) # Pinning the virtualenv before creating one # Use pip3 if possible while pip seems to install the virtualenv to wrong dir in some OS python3 = "python3" diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py index f4671478f..81ea45e28 100644 --- a/testing/wheel_tester.py +++ b/testing/wheel_tester.py @@ -35,7 +35,7 @@ sys.path.append(setup_script_dir) from setuptools._distutils import log from build_scripts.utils import (find_files_using_glob, find_glob_in_path, - rmtree, run_process, run_process_output) + remove_tree, run_process, run_process_output) log.set_verbosity(1) @@ -96,7 +96,7 @@ def clean_egg_info(): paths = find_files_using_glob(setup_script_dir, "*.egg-info") for p in paths: log.info(f"Removing {p}") - rmtree(p) + remove_tree(p) def install_wheel(wheel_path): @@ -241,7 +241,7 @@ def prepare_build_folder(src_path, build_folder_name): # preparing a build folder should clean any previous existing build. if os.path.exists(build_path): log.info(f"Removing {build_path}") - rmtree(build_path) + remove_tree(build_path) log.info(f"Creating {build_path}") os.makedirs(build_path) |
