diff options
author | Robin Gareus <robin@gareus.org> | 2015-11-25 16:36:37 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-11-25 16:36:37 +0100 |
commit | dc78fcfb2fc968f22e69857dae25c6619892d44f (patch) | |
tree | ffcffa6eb97864f654b351defc257707736f8530 /wscript | |
parent | 68da5a1402c8211758d890819249ca9fef7656ec (diff) |
check for itstool (>= 1.0.4, -j option)
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -748,6 +748,18 @@ def configure(conf): conf.env['CFLAGS'] = [] conf.env['CXXFLAGS'] = [] + # freedesktop translations needs itstool > 1.0.3 (-j option) + 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') + 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": + print("--freedesktop requires itstool > 2.0.0 to translate files.") + sys.exit(-1) + conf.env['VERSION'] = VERSION conf.env['MAJOR'] = MAJOR conf.env['MINOR'] = MINOR |