Skip to content
Snippets Groups Projects
Commit ae06f81f authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Revert "Add temptative python repository support"

This reverts commit 7396fc84.
parent 7396fc84
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,6 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False):
all_compilers = get_attribute_values(api_url, project, None, "MPCDF:compiler_modules")
mpis = get_attribute_values(api_url, project, package, "MPCDF:mpi_modules", with_project=True)
cudas = get_attribute_values(api_url, project, package, "MPCDF:cuda_modules", with_project=True)
pythons = get_attribute_values(api_url, project, package, "MPCDF:python_modules", with_project=True)
def enable(name):
node = ElementTree.Element("enable")
......@@ -170,9 +169,6 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False):
for mpi in mpis:
if valid_mpi(compiler, mpi):
enable(cuda + "_" + mpi + "_" + compiler)
if flag == "python":
for python in pythons:
enable(python)
if len(build.getchildren()) > 0:
build.getchildren()[-1].tail = "\n "
......@@ -192,7 +188,6 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
compilers = list(get_attribute_values(api_url, project, None, "MPCDF:compiler_modules"))
mpis = list(get_attribute_values(api_url, project, None, "MPCDF:mpi_modules"))
cudas = list(get_attribute_values(api_url, project, None, "MPCDF:cuda_modules"))
pythons = list(get_attribute_values(api_url, project, None, "MPCDF:python_modules"))
if distribution is None:
# Get existing value from project meta
......@@ -236,12 +231,10 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
is_mpi = kwargs.pop("mpi", False)
is_cuda = kwargs.pop("cuda", False)
is_cuda_mpi = kwargs.pop("cuda_mpi", False)
is_python = kwargs.pop("python", False)
have_compiler = is_compiler or is_mpi or is_cuda or is_cuda_mpi
have_mpi = is_mpi or is_cuda_mpi
have_cuda = is_cuda or is_cuda_mpi
have_python = is_python
if kwargs:
raise Exception("Invalid argument")
......@@ -274,12 +267,10 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
prjconf.append("%is_mpi_repository {0}".format(1 if is_mpi else 0))
prjconf.append("%is_cuda_repository {0}".format(1 if is_cuda else 0))
prjconf.append("%is_cuda_mpi_repository {0}".format(1 if is_cuda_mpi else 0))
prjconf.append("%is_python_repository {0}".format(1 if is_python else 0))
prjconf.append("%have_mpcdf_compiler {0}".format(1 if have_compiler else 0))
prjconf.append("%have_mpcdf_mpi {0}".format(1 if have_mpi else 0))
prjconf.append("%have_mpcdf_cuda {0}".format(1 if have_cuda else 0))
prjconf.append("%have_mpcdf_python {0}".format(1 if have_python else 0))
prjconf.append(":Macros")
prjconf.append("%endif")
......@@ -305,9 +296,6 @@ def mpcdf_setup_repositories(api_url, project, distribution=None, parent=None, p
(project, mpi + "_" + compiler),
cuda_mpi=True)
for python in pythons:
repo(python, (project, "System"), python=True)
# Remove build configuration
build = root.find("./build")
if build is None:
......
......@@ -18,11 +18,9 @@ import osc.cmdln
help="Restrict the set of MPI implementations to use")
@osc.cmdln.option('--cuda-modules', nargs=1,
help="Restrict the set of CUDA implementations to use")
@osc.cmdln.option('--python-modules', nargs=1,
help="Restrict the set of Python implementations to use")
@osc.cmdln.option('--set', nargs=1, metavar="FLAGS",
help="Modify the set of enabled repositories, without this the current setup is displayed. "
"FLAGS is a comma-separated list of a subset of 'system', 'compilers', 'mpi', 'cuda_mpi', 'python'")
"FLAGS is a comma-separated list of a subset of 'system', 'compilers', 'mpi', 'cuda_mpi'")
@osc.cmdln.alias("mpcdf_enable_repos")
def do_mpcdf_enable_repositories(self, subcmd, opts, *args):
"""${cmd_name}: Select all appropriate repositories for an MPCDF package
......@@ -80,12 +78,11 @@ def do_mpcdf_enable_repositories(self, subcmd, opts, *args):
set_or_remove(opts.mpi_modules, "MPCDF:mpi_modules")
set_or_remove(opts.cuda_modules, "MPCDF:cuda_modules")
set_or_remove(opts.python_modules, "MPCDF:python_modules")
set_or_remove(opts.compiler_modules, "MPCDF:compiler_modules")
if opts.recreate or opts.set:
mpcdf_common.mpcdf_enable_repositories(api_url, project, package, verbose=True)
elif (opts.compiler_modules or opts.mpi_modules or opts.cuda_modules or opts.python_modules):
elif (opts.compiler_modules or opts.mpi_modules or opts.cuda_modules):
print("ERROR: Invalid arguments, try --help")
else:
try:
......@@ -105,4 +102,3 @@ def do_mpcdf_enable_repositories(self, subcmd, opts, *args):
print_attr("- Subset of compiler modules set to:", "MPCDF:compiler_modules")
print_attr("- Subset of MPI modules set to:", "MPCDF:mpi_modules")
print_attr("- Subset of CUDA modules set to:", "MPCDF:cuda_modules")
print_attr("- Subset of Python modules set to:", "MPCDF:python_modules")
......@@ -45,7 +45,6 @@ def do_mpcdf_info(self, subcmd, opts, *args):
print_attribute("Compilers", "MPCDF:compiler_modules")
print_attribute("MPI libraries", "MPCDF:mpi_modules")
print_attribute("CUDA versions", "MPCDF:cuda_modules")
print_attribute("Python versions", "MPCDF:python_modules")
unmanaged = []
......@@ -74,8 +73,7 @@ def do_mpcdf_info(self, subcmd, opts, *args):
print(" " + pkg_name_fmt.format(package), ", ".join(enabled_repos),
subset("compiler subset", "MPCDF:compiler_modules") +
subset("MPI subset", "MPCDF:mpi_modules") +
subset("CUDA subset", "MPCDF:cuda_modules") +
subset("Python subset", "MPCDF:python_modules"))
subset("CUDA subet", "MPCDF:cuda_modules"))
print()
if unmanaged:
......
......@@ -20,9 +20,8 @@ import osc.cmdln
def do_mpcdf_setup_repositories(self, subcmd, opts, *args):
"""${cmd_name}: Create all repository combinations for an MPCDF project
Given a list of compilers, MPI libraries, and possibly CUDA and python
versions from the project attributes, this command creates repositories for
all the resulting combinations
Given a list of compilers, MPI libraries, and possibly CUDA versions, this command
creates repositories for all the resulting combinations
Usage:
osc ${cmd_name} [PROJECT]
......
......@@ -42,7 +42,7 @@ def do_mpcdf_sync_projects(self, subcmd, opts, *args):
from_packages = [package]
to_packages = osc.core.meta_get_packagelist(api_url, to_project)
project_attributes = ["MPCDF:compiler_modules", "MPCDF:cuda_modules", "MPCDF:mpi_modules", "MPCDF:python_modules"]
project_attributes = ["MPCDF:compiler_modules", "MPCDF:cuda_modules", "MPCDF:mpi_modules"]
package_attributes = ["MPCDF:enable_repositories"] + project_attributes
for attribute in project_attributes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment