autobuild: Update variable name to make more sense
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 12 Feb 2019 23:41:34 +0000 (12:41 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 15 Feb 2019 03:35:22 +0000 (04:35 +0100)
When we switched from python2 being the default to python3, we didn't
update this variable name. It's now handling the python2 case, but it's
a boolean flag named 'py3', which is rather confusing.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
script/autobuild.py

index 30bc64306ffd5992d217f2ef9ead8f871065cecd..72050e0eb023e40bca30b3fb6d78e3bd756f82ea 100755 (executable)
@@ -457,9 +457,9 @@ def run_cmd(cmd, dir=".", show=None, output=False, checkfail=True):
 class builder(object):
     '''handle build of one directory'''
 
-    def __init__(self, name, sequence, cp=True, py3=False):
+    def __init__(self, name, sequence, cp=True, py2=False):
         self.name = name
-        self.py3 = py3
+        self.py2 = py2
         if name in builddirs:
             self.dir = builddirs[name]
         else:
@@ -498,7 +498,7 @@ class builder(object):
         (self.stage, self.cmd, self.output_mime_type) = self.sequence[self.next]
         self.cmd = self.cmd.replace("${PYTHON_PREFIX}", get_python_lib(plat_specific=1, standard_lib=0, prefix=self.prefix))
         self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix)
-        if self.py3:
+        if self.py2:
             self.cmd = self.cmd.replace("${EXTRA_PYTHON}", "%s" % extra_python)
             # The trailing space is important
             self.cmd = self.cmd.replace("${PY3_ONLY}", "python2 ")
@@ -542,7 +542,7 @@ class buildlist(object):
                 b = builder(n,
                             tasks[n[:-4]],
                             cp=n is not "pidl",
-                            py3=True)
+                            py2=True)
             else:
                 b = builder(n, tasks[n], cp=n is not "pidl")
             self.tlist.append(b)