summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct26
1 files changed, 18 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index f500bd8a..061c18db 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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"])