From 69caeada8d54d148dbfdc7d1306c8fb790696399 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 17 Sep 2019 12:48:39 +0200 Subject: run_pro2cmake.py: Run on Windows Prefix by python executable and drop os.nice. Change-Id: Idd1d0de6695887652db84261da1130a084e5af78 Reviewed-by: Cristian Adam Reviewed-by: Alexandru Croitor Reviewed-by: Qt CMake Build Bot --- util/cmake/run_pro2cmake.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'util/cmake/run_pro2cmake.py') diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py index f98dbf63a8..0d4cff2d67 100755 --- a/util/cmake/run_pro2cmake.py +++ b/util/cmake/run_pro2cmake.py @@ -31,6 +31,7 @@ import glob import os import subprocess import concurrent.futures +import sys import typing import argparse from argparse import ArgumentParser @@ -123,12 +124,15 @@ def run(all_files: typing.List[str], pro2cmake: str, args: argparse.Namespace) - # qtbase main modules take longer than usual to process. workers = 2 - with concurrent.futures.ThreadPoolExecutor(max_workers=workers, initializer=os.nice, initargs=(10,)) as pool: + with concurrent.futures.ThreadPoolExecutor(max_workers=workers, initargs=(10,)) as pool: print('Firing up thread pool executor.') def _process_a_file(data: typing.Tuple[str, int, int]) -> typing.Tuple[int, str, str]: filename, index, total = data - pro2cmake_args = [pro2cmake] + pro2cmake_args = [] + if sys.platform == "win32": + pro2cmake_args.append(sys.executable) + pro2cmake_args.append(pro2cmake) if args.is_example: pro2cmake_args.append('--is-example') pro2cmake_args.append(os.path.basename(filename)) -- cgit v1.2.3