From a91e4a009d2ee9839ac84ce3d21a438067b90c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Fri, 22 Apr 2022 12:38:41 +0200 Subject: build: copy instead of move the package directory this had the effect that the 'setup.py install' command was failing to copy the built modules into the Python's site-packages. Change-Id: Ifc5a94a43d68783a71efe29baa73f068a4c418a3 Reviewed-by: Friedemann Kleint (cherry picked from commit 16c4e9d5d5a094b007bae1e1e496fc5ec35226fe) Reviewed-by: Christian Tismer --- build_scripts/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_scripts/main.py b/build_scripts/main.py index 3f8ebd4d7..edc84f4c4 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -45,6 +45,7 @@ import re import sys import importlib from pathlib import Path +from shutil import which, copytree from textwrap import dedent import time from .config import config @@ -457,7 +458,9 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin): _src = Path(_path / _package_name) _dst = Path(_wheel_path / _package_name) try: - Path(_path / _package_name).rename(_wheel_path / _package_name) + # This should be copied because the package directory + # is used when using the 'install' setup.py instruction. + copytree(_src, _dst) except Exception as e: log.warn(f'***** problem renaming "{self.st_build_dir}"') log.warn(f'ignored error: {type(e).__name__}: {e}') -- cgit v1.2.3