diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-17 12:48:39 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-17 12:57:10 +0000 |
commit | 69caeada8d54d148dbfdc7d1306c8fb790696399 (patch) | |
tree | 2232e822b2ac77cb08fd03733589bb4014cfacc0 /util/cmake/run_pro2cmake.py | |
parent | 933d383a24fa4a98075b98fc9fe3ed04895a5883 (diff) |
run_pro2cmake.py: Run on Windows
Prefix by python executable and drop os.nice.
Change-Id: Idd1d0de6695887652db84261da1130a084e5af78
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'util/cmake/run_pro2cmake.py')
-rwxr-xr-x | util/cmake/run_pro2cmake.py | 8 |
1 files changed, 6 insertions, 2 deletions
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)) |