fix fullnames

This commit is contained in:
Harmen Stoppels 2025-04-25 13:52:09 +02:00
parent 6822db0fe7
commit ecf882c240

View File

@ -831,13 +831,10 @@ def fullname(cls):
def fullnames(cls):
"""Fullnames for this package and any packages from which it inherits."""
fullnames = []
for cls in cls.__mro__:
namespace = getattr(cls, "namespace", None)
if namespace:
fullnames.append("%s.%s" % (namespace, cls.name))
if namespace == "builtin":
# builtin packages cannot inherit from other repos
for base in cls.__mro__:
if not base.__module__.startswith(f"{spack.repo.ROOT_PYTHON_NAMESPACE}."):
break
fullnames.append(base.fullname)
return fullnames
@classproperty