Skip to content

Commit

Permalink
Use self.spec.satisfies syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiesquire committed Aug 20, 2024
1 parent d1cef91 commit 130b328
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/mom5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Mom5(MakefilePackage):
depends_on("oasis3-mct~deterministic", when="~deterministic")
depends_on("libaccessom2+deterministic", when="+deterministic")
depends_on("libaccessom2~deterministic", when="~deterministic")
with when("@access-esm1:access-esm1.6"):
with when("@access-esm1.5:access-esm1.6"):
depends_on("[email protected]:4.7.4")
depends_on("[email protected]:4.5.2")
# Depend on "openmpi".
Expand All @@ -61,7 +61,7 @@ def edit(self, spec, prefix):
config = {}

# NOTE: The order of the libraries matters during the linking step!
if ("@access-esm1.5" in self.spec) or ("@access-esm1.6" in self.spec):
if self.spec.satisfies("@access-esm1.5:access-esm1.6"):
istr = " ".join([
join_path((spec["oasis3-mct"].headers).cpp_flags, "psmile.MPI1"),
join_path((spec["oasis3-mct"].headers).cpp_flags, "mct")])
Expand Down Expand Up @@ -167,7 +167,7 @@ def edit(self, spec, prefix):
"""

# Copied from bin/mkmf.template.nci
if ("@access-esm1.5" in self.spec) or ("@access-esm1.6" in self.spec):
if self.spec.satisfies("@access-esm1.5:access-esm1.6"):
config["intel"] = f"""
ifeq ($(VTRACE), yes)
FC = mpifort-vt
Expand Down Expand Up @@ -301,7 +301,7 @@ def edit(self, spec, prefix):
config["oneapi"] = config["intel"]

# Copied from bin/mkmf.template.t90
if ("@access-esm1.5" in self.spec) or ("@access-esm1.6" in self.spec):
if self.spec.satisfies("@access-esm1.5:access-esm1.6"):
config["post"] = """
# you should never need to change any lines below.
Expand Down Expand Up @@ -487,7 +487,7 @@ def build(self, spec, prefix):
build = Executable("./MOM_compile.csh")
if "+restart_repro" in self.spec:
build.add_default_env("REPRO", "true")
if "@access-esm1.5" not in self.spec:
if self.spec.satisfies("@access-esm1.5"):
# The MOM5 commit d7ba13a3f364ce130b6ad0ba813f01832cada7a2
# requires the --no_version switch to avoid git hashes being
# embedded in the binary.
Expand Down

0 comments on commit 130b328

Please sign in to comment.