aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-04-22 12:38:41 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-04-22 19:12:02 +0000
commit7895de822bc65fa16650ce2ebe66a12e08da41d1 (patch)
treef36b55db76d42ef33843400a3b12b9a1e6c11a4e /build_scripts
parent934c43b354ed909616c2c097378a1caf35b33f11 (diff)
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 <Friedemann.Kleint@qt.io> (cherry picked from commit 16c4e9d5d5a094b007bae1e1e496fc5ec35226fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 861913be6..65ddca716 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -44,7 +44,7 @@ import re
import sys
import time
from pathlib import Path
-from shutil import which
+from shutil import which, copytree
from textwrap import dedent
import setuptools # Import setuptools before distutils
@@ -452,7 +452,9 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin):
_src = Path(_path / _package_name)
_dst = Path(_wheel_path / _package_name)
try:
- _src.rename(_dst)
+ # 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}')