diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-21 19:38:40 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-21 19:38:40 -0700 |
commit | 0e58206bf0993c6c6d901ac85683cbf0073989ba (patch) | |
tree | ed3f3d9fa1f2bf1fa91d00e6ffa400c1a0778061 /SConstruct | |
parent | e6d209947d200e835cc8e94cf9273bc0f0b5c462 (diff) | |
download | gpsd-0e58206bf0993c6c6d901ac85683cbf0073989ba.tar.gz |
SConstruct: do not build xgps and xgpsspeed if pycairo not found.
Used to not be a problem, but now 'scons check' tests the python
programs, and those two fail without pycairo.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -34,6 +34,7 @@ from __future__ import print_function import ast import copy import glob +import imp # for imp.find_module('gps'), imp deprecated in 3.4 import operator import os import platform @@ -1364,6 +1365,16 @@ if not env['python']: python_progs = [] 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']: python_progs.extend(["xgps", "xgpsspeed"]) python_modules = Glob('gps/*.py') |