-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpackage.py
53 lines (40 loc) · 1.37 KB
/
package.py
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2022 ACCESS-NRI
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
# See https://spack.readthedocs.io/en/latest/packaging_guide.html for a guide
# on how this file works.
class Cable(CMakePackage):
"""The CSIRO Atmosphere Biosphere Land Exchange (CABLE) model."""
homepage = "https://github.com/CABLE-LSM/CABLE"
git = "https://github.com/CABLE-LSM/CABLE.git"
maintainers("SeanBryan51")
version("main", branch="main")
def url_for_version(self, version):
return "https://github.com/CABLE-LSM/CABLE/tarball/{0}".format(version)
variant(
"mpi",
default=True,
description="Build MPI executable.",
)
variant(
"library",
default=False,
description="Build CABLE science library object.",
)
variant(
"build_type",
default="Release",
description="CMake build type",
values=("Debug", "Release"),
)
depends_on("[email protected]:")
depends_on("mpi", when="+mpi")
def cmake_args(self):
args = []
args.append(self.define_from_variant("CABLE_MPI", "mpi"))
args.append(self.define_from_variant("CABLE_LIBRARY", "library"))
return args