Skip to contentSkip to conversation

add check for python-devel to tools build (take 2)

PATCH New Jan Beulich 1 participant 1 message Nov 22, 2006

lore
Share & tools
lore
#0 lore raw

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.

tools/check/check_python_devel new file +16 -0
Index: 2006-11-17/tools/check/check_python_devel
===================================================================
@@ -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