diff --git a/spack_repo/packages/dwd-icon-tools/package.py b/spack_repo/packages/dwd-icon-tools/package.py index f2f8d06ad3828bec07c204744a4a90a4e9a0409a..e68612190490c49655523b902cc81ffcdf9f6f5a 100644 --- a/spack_repo/packages/dwd-icon-tools/package.py +++ b/spack_repo/packages/dwd-icon-tools/package.py @@ -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") diff --git a/spack_repo/packages/icon-nwp/package.py b/spack_repo/packages/icon-nwp/package.py index cf6e8c7a6218d843d0408701a5d24bf49710ed21..89e9b1ce5de6f66533be9df4f6d20770964632b5 100644 --- a/spack_repo/packages/icon-nwp/package.py +++ b/spack_repo/packages/icon-nwp/package.py @@ -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