build: Remove Python2 support from the build
[metze/samba-autobuild/.git] / buildtools / wafsamba / samba_python.py
index 4476d3352484091bdf5d3877dca81482254f7061..5703954a4debbaaeee91e7bbc2d910e1592b0899 100644 (file)
@@ -5,10 +5,10 @@ from waflib import Build, Logs, Utils, Configure, Errors
 from waflib.Configure import conf
 
 @conf
-def SAMBA_CHECK_PYTHON(conf, version=(3,4,0)):
+def SAMBA_CHECK_PYTHON(conf, version=(3,6,0)):
 
-    if conf.env.disable_python:
-        version=(2,6,0)
+    if conf.env.enable_fuzzing:
+        version=(3,5,0)
 
     # enable tool to build python extensions
     if conf.env.HAVE_PYTHON_H:
@@ -104,6 +104,10 @@ def SAMBA_PYTHON(bld, name,
     if not bld.PYTHON_BUILD_IS_ENABLED():
         enabled = False
 
+    # Save time, no need to build python bindings when fuzzing
+    if bld.env.enable_fuzzing:
+        enabled = False
+
     # when we support static python modules we'll need to gather
     # the list from all the SAMBA_PYTHON() targets
     if init_function_sentinel is not None: