|
|
|
@ -22,7 +22,7 @@ from calculate.lib.datavars import (TableVariable, Variable, ReadonlyVariable,
|
|
|
|
|
VariableError, ReadonlyTableVariable,
|
|
|
|
|
FieldValue, HumanReadable)
|
|
|
|
|
from calculate.lib.utils.files import (listDirectory, process, PIPE, pathJoin,
|
|
|
|
|
readFileEx)
|
|
|
|
|
readFileEx)
|
|
|
|
|
from calculate.lib.utils.portage import (isPkgInstalled, RepositoryPath,
|
|
|
|
|
getInstalledAtom)
|
|
|
|
|
from calculate.lib.utils.common import cmpVersion
|
|
|
|
@ -821,6 +821,11 @@ class VariableOsPython(ReadonlyVariable):
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
chroot_path = self.get_root()
|
|
|
|
|
if chroot_path == "/":
|
|
|
|
|
p = process("/usr/bin/emerge","--version")
|
|
|
|
|
m = re.search("python (\d\.\d)", p.read())
|
|
|
|
|
if m:
|
|
|
|
|
return "python%s" % m.group(1)
|
|
|
|
|
pythons = readFileEx(pathJoin(chroot_path,
|
|
|
|
|
"/etc/python-exec/python-exec.conf"), grab=True).split()
|
|
|
|
|
if pythons:
|
|
|
|
|