summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-21 20:19:00 -0700
committerGary E. Miller <gem@rellim.com>2018-09-21 20:19:00 -0700
commit2453b0b9ab33f4af42014c47c26e1ab2389cb996 (patch)
tree88b38d219f1ab37ccc7fff94c396e95d7cb80c6b /SConstruct
parent1a292584033f0cf214cf7a392644e37fe64b8e5c (diff)
downloadgpsd-2453b0b9ab33f4af42014c47c26e1ab2389cb996.tar.gz
SConstruct: check for pygobject (gi) for xgps and xgpsspeed
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"])