forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.py
More file actions
26 lines (17 loc) · 743 Bytes
/
module.py
File metadata and controls
26 lines (17 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from typing import Callable, Dict # novm
import spack.cmd.modules.lmod
import spack.cmd.modules.tcl
description = "generate/manage module files"
section = "user environment"
level = "short"
_subcommands = {} # type: Dict[str, Callable]
def setup_parser(subparser):
sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='module_command')
spack.cmd.modules.lmod.add_command(sp, _subcommands)
spack.cmd.modules.tcl.add_command(sp, _subcommands)
def module(parser, args):
_subcommands[args.module_command](parser, args)