diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-21 20:19:00 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-21 20:19:00 -0700 |
commit | 2453b0b9ab33f4af42014c47c26e1ab2389cb996 (patch) | |
tree | 88b38d219f1ab37ccc7fff94c396e95d7cb80c6b /SConstruct | |
parent | 1a292584033f0cf214cf7a392644e37fe64b8e5c (diff) | |
download | gpsd-2453b0b9ab33f4af42014c47c26e1ab2389cb996.tar.gz |
SConstruct: check for pygobject (gi) for xgps and xgpsspeed
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -1366,14 +1366,24 @@ if not env['python']: else: python_progs = ["gegps", "gpscat", "gpsfake", "gpsprof"] - # check for pycairo - try: - imp.find_module('cairo') - except ImportError: - # no pycairo, can't build xgps, xgpsspeed - announce("Python module pycairo not found, " - "xgps and xgpsspeed will not be installed") - env['xgps'] = False + if env['xgps']: + # check for pycairo + try: + imp.find_module('cairo') + except ImportError: + # no pycairo, can't build xgps, xgpsspeed + announce("Python module pycairo not found, " + "xgps and xgpsspeed will not be installed") + env['xgps'] = False + + # check for pygobject + try: + imp.find_module('gi') + except ImportError: + # no pycairo, can't build xgps, xgpsspeed + announce("Python module pygobject not found, " + "xgps and xgpsspeed will not be installed") + env['xgps'] = False if env['xgps']: python_progs.extend(["xgps", "xgpsspeed"]) |