build: introduce SAMBA_CHECK_PYTHON_HEADERS
[nivanova/samba-autobuild/.git] / buildtools / wafsamba / samba_python.py
index ad099814622a8d2bee582d99bd5e31d6609962cc..a663b1910d063336c1340142ae8855d7e176ecdb 100644 (file)
@@ -4,6 +4,15 @@ import Build
 from samba_utils import *
 from samba_autoconf import *
 
+from Configure import conf
+@conf
+def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True):
+    if conf.env["python_headers_checked"] == []:
+        conf.check_python_headers(mandatory)
+        conf.env["python_headers_checked"] = "yes"
+    else:
+        conf.msg("python headers", "using cache")
+
 
 def SAMBA_PYTHON(bld, name,
                  source='',