CI: Run autobuild jobs with python3
[amitay/samba.git] / wscript
diff --git a/wscript b/wscript
index ae1b929c4951982101ca24dba7d6b22abfc6aba7..da4254efde49b5b4d3d4e4529f75c53788117fcc 100644 (file)
--- a/wscript
+++ b/wscript
@@ -55,6 +55,14 @@ def options(opt):
                    help='build Samba with system MIT Kerberos. ' +
                         'You may specify list of paths where Kerberos is installed (e.g. /usr/local /usr/kerberos) to search krb5-config',
                    action='callback', callback=system_mitkrb5_callback, dest='with_system_mitkrb5', default=False)
+
+    opt.add_option('--with-experimental-mit-ad-dc',
+                   help='Enable the experimental MIT Kerberos-backed AD DC.  ' +
+                   'Note that security patches are not issued for this configuration',
+                   action='store_true',
+                   dest='with_experimental_mit_ad_dc',
+                   default=False)
+
     opt.add_option('--with-system-mitkdc',
                    help=('Specify the path to the krb5kdc binary from MIT Kerberos'),
                    type="string",
@@ -157,9 +165,6 @@ def configure(conf):
     if sys.platform == 'darwin':
         conf.ADD_LDFLAGS('-framework CoreFoundation')
 
-    if int(conf.env['PYTHON_VERSION'][0]) >= 3:
-        raise Errors.WafError('Python version 3.x is not supported by Samba yet')
-
     conf.RECURSE('dynconfig')
     conf.RECURSE('selftest')
 
@@ -217,17 +222,26 @@ def configure(conf):
         conf.DEFINE('AD_DC_BUILD_IS_ENABLED', 1)
 
     if Options.options.with_system_mitkrb5:
+        if not Options.options.with_experimental_mit_ad_dc and \
+           not Options.options.without_ad_dc:
+            raise Errors.WafError('The MIT Kerberos build of Samba as an AD DC ' +
+                                  'is experimental. Therefore '
+                                  '--with-system-mitkrb5 requires either ' +
+                                  '--with-experimental-mit-ad-dc or ' +
+                                  '--without-ad-dc')
+
         conf.PROCESS_SEPARATE_RULE('system_mitkrb5')
+
     if not (Options.options.without_ad_dc or Options.options.with_system_mitkrb5):
         conf.DEFINE('AD_DC_BUILD_IS_ENABLED', 1)
 
     if Options.options.with_system_heimdalkrb5:
         if Options.options.with_system_mitkrb5:
-            raise Utils.WafError('--with-system-heimdalkrb5 conflicts with ' +
-                                 '--with-system-mitkrb5')
+            raise Errors.WafError('--with-system-heimdalkrb5 conflicts with ' +
+                                  '--with-system-mitkrb5')
         if not Options.options.without_ad_dc:
-            raise Utils.WafError('--with-system-heimdalkrb5 requires ' +
-                                 '--without-ad-dc')
+            raise Errors.WafError('--with-system-heimdalkrb5 requires ' +
+                                  '--without-ad-dc')
         conf.env.SYSTEM_LIBS += ('heimdal', 'asn1', 'com_err', 'roken',
                                  'hx509', 'wind', 'gssapi', 'hcrypto',
                                  'krb5', 'heimbase', 'asn1_compile',