From 1527e9703dacfe2c9004bf146a0f774f14f7eaf1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 5 May 2025 14:08:58 +0200 Subject: [PATCH] builder.py: check `is_package_module` for v2 support (#50298) --- lib/spack/spack/builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/builder.py b/lib/spack/spack/builder.py index 23dac2c548c..ba9d7be3c04 100644 --- a/lib/spack/spack/builder.py +++ b/lib/spack/spack/builder.py @@ -59,7 +59,7 @@ def __call__(self, spec, prefix): def get_builder_class(pkg, name: str) -> Optional[Type["Builder"]]: """Return the builder class if a package module defines it.""" cls = getattr(pkg.module, name, None) - if cls and cls.__module__.startswith(spack.repo.PKG_MODULE_PREFIX_V1): + if cls and spack.repo.is_package_module(cls.__module__): return cls return None