diff options
author | Robin Gareus <robin@gareus.org> | 2015-12-05 14:04:11 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-12-05 14:04:11 +0100 |
commit | 68d3b459763c6783f966bba02b9d895e454574a7 (patch) | |
tree | 6be7a2798606be290b94c7812a3dae735e85b882 /wscript | |
parent | 7ad8ad8823b4eb05660a73411c071f4d5083dc1f (diff) |
improve itstool detection:
handle "/bin/sh: 1: itstool: not found" cases.
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -752,11 +752,12 @@ def configure(conf): if Options.options.freedesktop: output = subprocess.Popen("itstool --version", shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() o = output[0].decode('utf-8') + itstool = o.split(' ')[0] version = o.split(' ')[1].split('.') # use distutils.version.StrictVersion or something python to check >= 1.0.4 # but first make sure that all build-hosts (incl. OSX-10.5/PPC) have that python lib. # lazy approach: just use major version 2.X.X - if version[0] < "2": + if itstool != "itstool" or version[0] < "2": print("--freedesktop requires itstool > 2.0.0 to translate files.") sys.exit(-1) |