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>
class builder(object):
'''handle build of one directory'''
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):
if name in builddirs:
self.dir = builddirs[name]
else:
if name in builddirs:
self.dir = builddirs[name]
else:
(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)
(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)
self.cmd = self.cmd.replace("${EXTRA_PYTHON}", "%s" % extra_python)
# The trailing space is important
self.cmd = self.cmd.replace("${PY3_ONLY}", "python2 ")
self.cmd = self.cmd.replace("${EXTRA_PYTHON}", "%s" % extra_python)
# The trailing space is important
self.cmd = self.cmd.replace("${PY3_ONLY}", "python2 ")
b = builder(n,
tasks[n[:-4]],
cp=n is not "pidl",
b = builder(n,
tasks[n[:-4]],
cp=n is not "pidl",
else:
b = builder(n, tasks[n], cp=n is not "pidl")
self.tlist.append(b)
else:
b = builder(n, tasks[n], cp=n is not "pidl")
self.tlist.append(b)