Skip to content
Snippets Groups Projects
Commit b2ecd871 authored by Takumi.Matsunobu's avatar Takumi.Matsunobu
Browse files

Use more primitive way to detect version dependency

parent 5966e287
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@
from spack.package import *
import os
from urllib.parse import urlparse
from packaging import version
class DwdIconTools(Package):
"""DWD Icon Tools"""
......@@ -45,7 +44,7 @@ class DwdIconTools(Package):
depends_on("netcdf-c")
depends_on("netcdf-fortran")
if version.parse(spack.spack_version) < version.parse("23.0.1"):
if int(spack.spack_version.split(".")[0]) < 23:
depends_on("eccodes+fortran")
else:
depends_on("eccodes+fortran+tools")
......
......@@ -8,7 +8,6 @@ import os
from urllib.parse import urlparse
from spack.package import *
from packaging import version
class IconNwp(Package):
"""
......@@ -57,10 +56,11 @@ class IconNwp(Package):
depends_on("mpi")
depends_on("netcdf-c")
depends_on("netcdf-fortran")
if version.parse(spack.spack_version) < version.parse("23.0.1"):
if int(spack.spack_version.split(".")[0]) < 23:
depends_on("eccodes+fortran")
else:
depends_on("eccodes+fortran+tools")
depends_on("libxml2")
# If you using inwp_psp=2 (with non-divergent 3D flow), petsc is necessary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment