diff options
author | Fred Wright <fw@fwright.net> | 2018-09-29 15:17:30 -0700 |
---|---|---|
committer | Fred Wright <fw@fwright.net> | 2018-09-29 15:17:30 -0700 |
commit | d83c5e2177696b21e41c2c5d447858fb4d47a990 (patch) | |
tree | 3c59c5d2f0175e123e2a91fcad3e9b25406111f9 | |
parent | 3b6af9d02279d610d9987944b7ab20543752dbdc (diff) | |
download | gpsd-d83c5e2177696b21e41c2c5d447858fb4d47a990.tar.gz |
Fixes possible X11 launch in python-versions test.
Some of the Gtk imports may have the side effect of launching an
X11 server if one isn't currently available (at least on the Mac).
This can be suppressed by clearing the DISPLAY environment variable
prior to those imports. This fix arranges to apply that to the
environment used by the python-versions test.
TESTED:
Ran "scons python-versions" on OSX, and observed no X11 launch.
-rw-r--r-- | SConstruct | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1832,17 +1832,17 @@ AlwaysBuild(Alias(".", [], error_action)) # Utility productions -def Utility(target, source, action): - target = env.Command(target=target, source=source, action=action) +def Utility(target, source, action, **kwargs): + target = env.Command(target=target, source=source, action=action, **kwargs) env.AlwaysBuild(target) env.Precious(target) return target -def UtilityWithHerald(herald, target, source, action): +def UtilityWithHerald(herald, target, source, action, **kwargs): if not env.GetOption('silent'): action = ['@echo "%s"' % herald] + action - return Utility(target=target, source=source, action=action) + return Utility(target=target, source=source, action=action, **kwargs) # Putting in all these -U flags speeds up cppcheck and allows it to look @@ -1900,9 +1900,12 @@ if python_progs: # get version from each python prog # this ensures they can run and gps_versions match vchk = '' + verenv = env['ENV'].copy() + verenv['DISPLAY'] = '' # Avoid launching X11 in X11 progs for prog in python_progs: vchk += '$SRCDIR/%s -V\n' % prog - python_versions = Utility('python-versions', [python_progs], vchk) + python_versions = Utility('python-versions', [python_progs], vchk, + ENV=verenv) else: python_versions = None |