Add Python version to environment file
This commit is contained in:
parent
d99be12b05
commit
860c5711ef
@ -17,6 +17,14 @@ def executeCommand(command, stdin = None, cwd = None):
|
|||||||
|
|
||||||
return stdout.decode("utf-8"), stderr.decode("utf-8"), exitCode
|
return stdout.decode("utf-8"), stderr.decode("utf-8"), exitCode
|
||||||
|
|
||||||
|
def pythonVersion(config):
|
||||||
|
version, _, _ = executeCommand([config["executables"]["python"]["binary"], "--version"])
|
||||||
|
version = version.strip()
|
||||||
|
|
||||||
|
match = re.match(r'Python (.*?)$', version, re.M | re.I)
|
||||||
|
|
||||||
|
return match.group(1)
|
||||||
|
|
||||||
def plaspVersion(config):
|
def plaspVersion(config):
|
||||||
version, _, _ = executeCommand([config["executables"]["plasp"]["binary"], "-v"])
|
version, _, _ = executeCommand([config["executables"]["plasp"]["binary"], "-v"])
|
||||||
version = version.strip()
|
version = version.strip()
|
||||||
@ -223,6 +231,7 @@ def runJob(configuration, instance, config):
|
|||||||
"workingDirectory": plannerDir,
|
"workingDirectory": plannerDir,
|
||||||
"versions": \
|
"versions": \
|
||||||
{
|
{
|
||||||
|
"python": pythonVersion(config),
|
||||||
"clingo": clingoVersion(config),
|
"clingo": clingoVersion(config),
|
||||||
"plasp": plaspVersion(config),
|
"plasp": plaspVersion(config),
|
||||||
"planner": plannerVersion(config),
|
"planner": plannerVersion(config),
|
||||||
|
Loading…
Reference in New Issue
Block a user