Commit 60e63478 authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl

Python 2 compatibility

parent ca80b621
Pipeline #71747 passed with stage
in 15 seconds
......@@ -615,7 +615,7 @@ Macros:
for oldrepo in root.findall("./repository"):
root.remove(oldrepo)
def repo(name, *dependencies, compiler=False, mpi=False, cuda=False, cuda_mpi=False, additional_prefers=(), **macros):
def repo(name, dependencies, compiler=False, mpi=False, cuda=False, cuda_mpi=False, additional_prefers=(), **macros):
old_repos.discard(name)
have_compiler = compiler or mpi or cuda or cuda_mpi
have_mpi = mpi or cuda_mpi
......@@ -719,11 +719,11 @@ Macros:
pgis = overloaded_project_attribute(api_url, project, "MPCDF:pgi_modules")
if parent:
repo("System", ("software", distribution))
repo("System", (("software", distribution),))
for compiler in compilers + pgis:
if project != "software":
dependencies = ("software", distribution)
dependencies = (("software", distribution),)
else:
dependencies = ()
repo(compiler, dependencies, compiler=True,
......@@ -731,17 +731,17 @@ Macros:
additional_prefers=("mpcdf_compiler_" + compiler,))
for mpi in filter(partial(valid_mpi, compiler), mpis):
repo(mpi + "_" + compiler, (project, compiler), mpi=True,
repo(mpi + "_" + compiler, ((project, compiler),), mpi=True,
mpi_repository=mpi, mpi_module=mpi_module(mpi))
for cuda in cudas:
for compiler in filter(partial(valid_cuda, cuda), compilers):
repo(cuda + "_" + compiler, (project, compiler), cuda=True, cuda_repository=cuda,
repo(cuda + "_" + compiler, ((project, compiler),), cuda=True, cuda_repository=cuda,
additional_prefers=("mpcdf_" + cuda,))
for mpi in filter(partial(valid_mpi, compiler), mpis):
repo(cuda + "_" + mpi + "_" + compiler,
(project, cuda + "_" + compiler),
(project, mpi + "_" + compiler),
((project, cuda + "_" + compiler),
(project, mpi + "_" + compiler)),
cuda_mpi=True)
if old_repos and not remove_old:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment