diff --git a/var/spack/repos/builtin/packages/bufr/package.py b/var/spack/repos/builtin/packages/bufr/package.py index cfc9c9d33209cb..27d92e582ca86b 100644 --- a/var/spack/repos/builtin/packages/bufr/package.py +++ b/var/spack/repos/builtin/packages/bufr/package.py @@ -17,12 +17,13 @@ class Bufr(CMakePackage): """ homepage = "https://noaa-emc.github.io/NCEPLIBS-bufr" - url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/v12.0.1.tar.gz" + url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/v12.1.0.tar.gz" git = "https://github.com/NOAA-EMC/NCEPLIBS-bufr" maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit") version("develop", branch="develop") + version("12.1.0", sha256="b5eae61b50d4132b2933b6e6dfc607e5392727cdc4f46ec7a94a19109d91dcf3") version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708") version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75") version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8") @@ -40,6 +41,8 @@ class Bufr(CMakePackage): variant("python", default=False, description="Enable Python interface") variant("shared", default=True, description="Build shared libraries", when="@11.5:") + variant("test_files", default="none", description="Path to test files") + variant("utils", default=True, description="Build utilities", when="@12.1:") extends("python", when="+python") @@ -49,6 +52,8 @@ class Bufr(CMakePackage): depends_on("py-pip", type="build", when="+python") depends_on("py-wheel", type="build", when="+python") + conflicts("%oneapi@:2024.1", msg="Requires oneapi 2024.2 or later") + def url_for_version(self, version): pre = "bufr_" if version < Version("12.0.1") else "" return ( @@ -65,8 +70,13 @@ def cmake_args(self): self.define_from_variant("ENABLE_PYTHON", "python"), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define("BUILD_TESTS", self.run_tests), + self.define("BUILD_TESTING", self.run_tests), + self.define_from_variant("BUILD_UTILS", "utils"), ] + if not self.spec.satisfies("test_files=none"): + args.append(self.define_from_variant("TEST_FILE_DIR", "test_files")) + return args def flag_handler(self, name, flags): @@ -116,6 +126,5 @@ def setup_run_environment(self, env): self._setup_bufr_environment(env, suffix) def check(self): - if self.spec.satisfies("~python"): - with working_dir(self.builder.build_directory): - make("test") + with working_dir(self.builder.build_directory): + make("test")