diff options
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"]) |