From 60e63478453c5e8d2a2c01c902d0d68f7706de0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lorenz=20H=C3=BCdepohl?= <dev@stellardeath.org>
Date: Tue, 31 Mar 2020 11:08:47 +0200
Subject: [PATCH] Python 2 compatibility

---
 mpcdf_common.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mpcdf_common.py b/mpcdf_common.py
index a45091e..fabb3bd 100644
--- a/mpcdf_common.py
+++ b/mpcdf_common.py
@@ -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:
-- 
GitLab