aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-24 14:17:32 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-11-24 14:55:21 +0000
commit90b23d1efef65b7410452399ca8f30f9215c04c2 (patch)
tree5951e78d029e3845330e7091af8a925343847c9e
parentef19637b7eab165accb8c3b0686061b21745ab74 (diff)
setup.py: Fix 'clean' command5.15.2
Do not add -reuse-build, which it cannot handle. Amends ff5a96c49e2aa5347c1c9892aad33c591e931639. Task-number: PYSIDE-807 Change-Id: I96ab03b95dd7762b1a16f2acc5d8ca31555ef1a3 Reviewed-by: Alexander Volkov <avolkov@astralinux.ru> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0a00958b083008dea340ef78b0f235ca49b7d22c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--build_scripts/setup_runner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/build_scripts/setup_runner.py b/build_scripts/setup_runner.py
index 57c8fbd1f..6eb0d8a26 100644
--- a/build_scripts/setup_runner.py
+++ b/build_scripts/setup_runner.py
@@ -88,8 +88,13 @@ class SetupRunner(object):
internal_build_type_arg = self.construct_internal_build_type_cmd_line_argument(build_type)
setup_cmd = [sys.executable] + self.sub_argv + [internal_build_type_arg]
+ command = self.sub_argv[0]
+ if command == 'setup.py' and len(self.sub_argv) > 1:
+ command = self.sub_argv[1]
+
# Add --reuse-build option if requested and not already present.
- if reuse_build and not self.cmd_line_argument_is_in_args("reuse-build", self.sub_argv):
+ if (reuse_build and command != 'clean'
+ and not self.cmd_line_argument_is_in_args("reuse-build", self.sub_argv)):
setup_cmd.append(self.construct_cmd_line_argument("reuse-build"))
self.invocations_list.append(setup_cmd)