From 2e4767da3c67b4b34f00b76a151d7669a2590a80 Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Sat, 17 Nov 2018 17:53:20 -0800 Subject: Adds missing dependencies on compiled Python extensions. The programs using the compiled Python extensions weren't specifying the extensions as dependencies. This sometimes caused flaky failures due to (parallel) build timing, and also caused "scons python-versions" from scratch to fail consistently. Since the dependencies aren't discovered automatically, they need to be added explicitly. TESTED: "scons python-versions" now succeeds when run from a clean state. --- SConstruct | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index fded8a3a..bd280990 100644 --- a/SConstruct +++ b/SConstruct @@ -1399,6 +1399,7 @@ if not env['python']: else: # installed python programs python_progs = ["gegps", "gpscat", "gpsfake", "gpsprof"] + python_deps = {'gpscat': 'packet'} # python misc helpers and stuff python_misc = [ @@ -1412,6 +1413,7 @@ else: "test_xgps_deps.py", "valgrind-audit.py" ] + python_deps['test_maidenhead.py'] = 'clienthelpers' python_manpages = { "gegps.1": "gps.xml", @@ -1458,6 +1460,8 @@ else: "xgps.1": "gps.xml", "xgpsspeed.1": "gps.xml", }) + python_deps['xgps'] = 'clienthelpers' + python_modules = Glob('gps/*.py') # Build Python binding @@ -1541,6 +1545,11 @@ else: ) python_compiled_libs[ext] = python_env.SharedLibrary( ext, python_objects[ext]) + + # Make sure we know about compiled dependencies + for prog, dep in python_deps.items(): + env.Depends(prog, python_compiled_libs['gps' + os.sep + dep]) + # Make PEP 241 Metadata 1.0. # Why not PEP 314 (V1.1) or PEP 345 (V1.2)? # V1.2 and V1.2 require a Download-URL to an installable binary -- cgit v1.2.1