diff options
author | Iikka Eklund <iikka.eklund@qt.io> | 2016-10-28 09:17:37 +0300 |
---|---|---|
committer | Heikki Halmet <heikki.halmet@qt.io> | 2016-10-28 06:25:00 +0000 |
commit | 341978a1055bb31d02e83a9e42b3635a5c2b5b7b (patch) | |
tree | d93a35f5be5bac17c0590a1df8af5e33433c494b /packaging-tools/create_installer.py | |
parent | 2823ab80b682e0fb85df99a04f9d148c0fc0210e (diff) |
Check '7z' tool from env better
Do not assume that '7z' exists as such in the directory names
specified by the $PATH. Instead try to find the executable.
Change-Id: Ic8c3a4aa21012b6968d74a5a05fdb8795be86bc4
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'packaging-tools/create_installer.py')
-rw-r--r-- | packaging-tools/create_installer.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/packaging-tools/create_installer.py b/packaging-tools/create_installer.py index 9acfda850..1dc9bd191 100644 --- a/packaging-tools/create_installer.py +++ b/packaging-tools/create_installer.py @@ -166,16 +166,8 @@ def main(): ############################################################## def check_required_tools(): """Check that valid tools are present in the build environment.""" - found = False - tool_name = '7z' - if bldinstallercommon.is_win_platform(): - tool_name = tool_name + '.exe' - for p in os.environ["PATH"].split(os.pathsep): - found = os.path.exists(os.path.join(p, tool_name)) - if found: - break - - if not found: + from distutils.spawn import find_executable + if not find_executable('7z'): raise EnvironmentError("7z tool not found in the PATH") |