add check for python-devel to tools build (take 2)
PATCH 1/1 add check for python-devel to tools build (take 2)
Again, this must be given exec permission after applying.
Thanks to Ewan Mellor, Anthony Liguori, and Daniel P. Berrange for pointing out problems with and solutions for the problems with the first version.
Signed-off-by Jan Beulich <[email protected]>
tools/check/check_python_devel new file +16 -0
@@ -0,0 +1,16 @@ +#!/bin/bash +# CHECK-BUILD + +function error { + echo + echo " *** Check for python development environment FAILED" + exit 1 +} + +python -c ' +import os.path, sys +for p in sys.path: + if os.path.exists(p + "/config/Makefile"): + sys.exit(0) +sys.exit(1) +' || error