aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/mkqt5bld.py
diff options
context:
space:
mode:
authorAntti Kokko <antti.kokko@theqtcompany.com>2015-04-08 13:20:17 +0300
committerAntti Kokko <antti.kokko@theqtcompany.com>2015-04-08 13:33:20 +0300
commitd14c57f20b5c9d19d7fd56284e468f47e786145e (patch)
tree08fc81c49db579477b8719dd4c1756d90b866c03 /packaging-tools/mkqt5bld.py
parentf23d57e2f9443cfb0fcf04669c70f5e297cdc89a (diff)
parentd48f9df5a5cf8c11c81a632b0b279623bd47c59a (diff)
Merge branch 'master' into refactor
Diffstat (limited to 'packaging-tools/mkqt5bld.py')
-rw-r--r--packaging-tools/mkqt5bld.py80
1 files changed, 38 insertions, 42 deletions
diff --git a/packaging-tools/mkqt5bld.py b/packaging-tools/mkqt5bld.py
index 615313cbf..d12027d09 100644
--- a/packaging-tools/mkqt5bld.py
+++ b/packaging-tools/mkqt5bld.py
@@ -52,7 +52,6 @@ import bld_icu_tools
import multiprocessing
import patch_qmake_qt_key
from optparse import OptionParser, Option
-import fnmatch
import shlex
SCRIPT_ROOT_DIR = os.getcwd()
@@ -358,7 +357,7 @@ def save_install_prefix():
print_wrap('*** Error! qmake executable not found? Looks like the build has failed in previous step?')
exit_script()
query_args = qmake_executable_path + ' -query'
- return_code, output = bldinstallercommon.do_execute_sub_process(query_args.split(' '), '.', True, True)
+ dummy, output = bldinstallercommon.do_execute_sub_process(query_args.split(' '), '.', True, True)
data = output.split('\n')
for line in data:
@@ -473,7 +472,6 @@ def build_qmlpuppets():
###############################
def install_qt():
print_wrap('---------------- Installing Qt -------------------------------------')
-
if QNX_BUILD:
install_root_path = MAKE_INSTALL_ROOT_DIR + os.sep + SINGLE_INSTALL_DIR_NAME
if bldinstallercommon.is_win_platform():
@@ -484,7 +482,7 @@ def install_qt():
cmd_args = MAKE_INSTALL_CMD + ' ' + 'INSTALL_ROOT=' + install_root_path
print_wrap('Installing module: Qt top level')
return_code, output = bldinstallercommon.do_execute_sub_process(cmd_args.split(' '), QT_SOURCE_DIR, QT_BUILD_OPTIONS.strict_mode,
- False, QT_BUILD_OPTIONS.system_env)
+ False, QT_BUILD_OPTIONS.system_env)
return
#make install for each module with INSTALL_ROOT
@@ -510,7 +508,7 @@ def install_qt():
cmd_args = MAKE_INSTALL_CMD + ' ' + 'INSTALL_ROOT=' + install_root_path
print_wrap('Installing module: ' + module_name)
return_code, output = bldinstallercommon.do_execute_sub_process(cmd_args.split(' '), submodule_dir_name, QT_BUILD_OPTIONS.strict_mode,
- False, QT_BUILD_OPTIONS.system_env)
+ False, QT_BUILD_OPTIONS.system_env)
if return_code >= 0:
file_handle = open(MISSING_MODULES_FILE, 'a')
file_handle.write('\nFailed to install ' + module_name)
@@ -544,7 +542,7 @@ def replace_build_paths(path_to_checked):
print_wrap('------------ Replacing build paths in ' + path_to_checked + '----------------')
pattern = re.compile(WORK_DIR_NAME)
qt_source_dir_delimeter_2 = QT_SOURCE_DIR.replace('/', os.sep)
- for root, dirs, files in os.walk(path_to_checked):
+ for root, dummy, files in os.walk(path_to_checked):
for name in files:
path = os.path.join(root, name)
if not os.path.isdir(path) and not os.path.islink(path):
@@ -600,7 +598,7 @@ def clean_up():
# remove examples from binary packages
bldinstallercommon.remove_directories_by_type(MAKE_INSTALL_ROOT_DIR, 'examples')
# all platforms
- for root, dirs, files in os.walk(MAKE_INSTALL_ROOT_DIR):
+ for root, dummy, files in os.walk(MAKE_INSTALL_ROOT_DIR):
for name in files:
if (any(name.endswith(to_remove) for to_remove in FILES_TO_REMOVE_LIST)):
path = os.path.join(root, name)
@@ -851,7 +849,7 @@ def parse_cmd_line():
if arg_count < 2:
OPTION_PARSER.print_help()
sys.exit(-1)
- (options, args) = OPTION_PARSER.parse_args()
+ (options, dummy) = OPTION_PARSER.parse_args()
QT_BUILD_OPTIONS = MkQtBuildOptions()
QT_BUILD_OPTIONS.set_args(options)
print_wrap('---------------------------------------------------------------------')
@@ -867,17 +865,17 @@ def setup_option_parser():
OPTION_PARSER = OptionParser(option_class=MultipleOption)
OPTION_PARSER.add_option("-u", "--src-url",
- action="store", type="string", dest="src_url", default="",
- help="the url where to fetch the source package")
+ action="store", type="string", dest="src_url", default="",
+ help="the url where to fetch the source package")
OPTION_PARSER.add_option("-m", "--make_cmd",
- action="store", type="string", dest="make_cmd", default="",
- help="make command (e.g. mingw32-make). On linux defaults to make and on win nmake.")
+ action="store", type="string", dest="make_cmd", default="",
+ help="make command (e.g. mingw32-make). On linux defaults to make and on win nmake.")
OPTION_PARSER.add_option("-j", "--jobs",
- action="store", type="int", dest="make_thread_count", default=multiprocessing.cpu_count()+1,
- help="make job count, uses the number of available processors plus one by default.")
+ action="store", type="int", dest="make_thread_count", default=multiprocessing.cpu_count()+1,
+ help="make job count, uses the number of available processors plus one by default.")
OPTION_PARSER.add_option("-q", "--silent-build",
- action="store_true", dest="silent_build", default=False,
- help="suppress command output, show only errors")
+ action="store_true", dest="silent_build", default=False,
+ help="suppress command output, show only errors")
OPTION_PARSER.add_option("-i", "--ignore",
action="extend", type="string", dest="module_ignore_list",
help="do not build module")
@@ -885,42 +883,42 @@ def setup_option_parser():
action="extend", type="string", dest="module_separate_install_list",
help="Create separate archives from the given Qt modules")
OPTION_PARSER.add_option("-S", "--non-strict-mode",
- action="store_false", dest="strict_mode", default=True,
- help="exit on error, defaults to true.")
+ action="store_false", dest="strict_mode", default=True,
+ help="exit on error, defaults to true.")
OPTION_PARSER.add_option("-c", "--configure",
- action="store", type="string", dest="configure_options", default="",
- help="options for configure command. In addition option -a can be used to give extra parameters.")
+ action="store", type="string", dest="configure_options", default="",
+ help="options for configure command. In addition option -a can be used to give extra parameters.")
OPTION_PARSER.add_option("-a", "--add-configure-option",
- action="store", type="string", dest="add_configure_option", default="",
- help="options to be added to configure options not defined in configure options file given with -c, e.g. -a \"-<configure_option> <value>\"")
+ action="store", type="string", dest="add_configure_option", default="",
+ help="options to be added to configure options not defined in configure options file given with -c, e.g. -a \"-<configure_option> <value>\"")
OPTION_PARSER.add_option("--creator-dir",
- action="store", type="string", dest="qt_creator_src_dir", default="",
- help="path to Qt Creator sources. If given, the Qt Quick Designer processes (qmlpuppet, qml2puppet) will be built and packaged.")
+ action="store", type="string", dest="qt_creator_src_dir", default="",
+ help="path to Qt Creator sources. If given, the Qt Quick Designer processes (qmlpuppet, qml2puppet) will be built and packaged.")
OPTION_PARSER.add_option("--replace-rpath",
- action="store_true", dest="replace_rpath", default=False,
- help="patch RPath with relative paths pointing to /lib")
+ action="store_true", dest="replace_rpath", default=False,
+ help="patch RPath with relative paths pointing to /lib")
OPTION_PARSER.add_option("--icu",
- action="store", type="string", dest="icu_uri", default="",
- help="use the given icu for qt5 build, e.g. --icu=http://download.qt.io/development_releases/prebuilt/icu/prebuilt/ubuntu1110/icu_51_1_ubuntu_11_10_64_devel.7z")
+ action="store", type="string", dest="icu_uri", default="",
+ help="use the given icu for qt5 build, e.g. --icu=http://download.qt.io/development_releases/prebuilt/icu/prebuilt/ubuntu1110/icu_51_1_ubuntu_11_10_64_devel.7z")
OPTION_PARSER.add_option("--runtime-path",
- action="store", type="string", dest="runtime_path", default="",
- help="use the given dynamic runtime path for qt5 build (-R for configure), e.g. --runtime-path=/home/user/my/path/here")
+ action="store", type="string", dest="runtime_path", default="",
+ help="use the given dynamic runtime path for qt5 build (-R for configure), e.g. --runtime-path=/home/user/my/path/here")
OPTION_PARSER.add_option("--prefix",
- action="store", type="string", dest="prefix", default="",
- help="use the given prefix for qt5 build (-prefix for configure)")
+ action="store", type="string", dest="prefix", default="",
+ help="use the given prefix for qt5 build (-prefix for configure)")
# for Android cross compilations
OPTION_PARSER.add_option("--android-ndk-host",
- action="store", type="string", dest="android_ndk_host", default="",
- help="E.g. linux-x86")
+ action="store", type="string", dest="android_ndk_host", default="",
+ help="E.g. linux-x86")
OPTION_PARSER.add_option("--android-api-version",
action="store", type="string", dest="android_api_version", default="",
help="API version for the Android.")
OPTION_PARSER.add_option("--android-sdk-home",
- action="store", type="string", dest="android_sdk_home", default="",
- help="Path to Android SDK home.")
+ action="store", type="string", dest="android_sdk_home", default="",
+ help="Path to Android SDK home.")
OPTION_PARSER.add_option("--android-ndk-home",
- action="store", type="string", dest="android_ndk_home", default="",
- help="Path to Android NDK home.")
+ action="store", type="string", dest="android_ndk_home", default="",
+ help="Path to Android NDK home.")
print_wrap('---------------------------------------------------------------------')
@@ -931,7 +929,6 @@ def main_call_parameters():
global MAKE_INSTALL_CMD
global CONFIGURE_OPTIONS
global ANDROID_BUILD
- global EXTRA_ENV
global DESKTOP_BUILD
global QNX_BUILD
@@ -979,12 +976,11 @@ def main_call_parameters():
icu_install_base_path = use_custom_icu()
print_wrap('Using custom ICU from path: ' + icu_install_base_path)
icu_path_lib = os.path.join(icu_install_base_path, 'lib')
- icu_path_inc = os.path.join(icu_install_base_path, 'include')
if bldinstallercommon.is_win_platform():
- env = EXTRA_ENV['LIB']
+ env = QT_BUILD_OPTIONS.system_env['LIB']
if env:
env = ';' + env
- EXTRA_ENV['LIB'] = icu_path_lib + env
+ QT_BUILD_OPTIONS.system_env['LIB'] = icu_path_lib + env
if QT_BUILD_OPTIONS.prefix:
CONFIGURE_OPTIONS += ' ' + '-prefix' + ' ' + QT_BUILD_OPTIONS.prefix
if QT_BUILD_OPTIONS.runtime_path: