spack setup : improved error message

This commit is contained in:
alalazo 2016-10-23 19:10:07 +02:00
parent fa3f07c092
commit e0f3188970

View File

@ -148,6 +148,12 @@ def setup(self, args):
spec.concretize()
package = spack.repo.get(spec)
if not isinstance(package, spack.CMakePackage):
tty.die(
'Support for {0} derived packages not yet implemented'.format(
package.build_system_class
)
)
# It's OK if the package is already installed.
@ -157,8 +163,4 @@ def setup(self, args):
# TODO: make this an argument, not a global.
spack.do_checksum = False
if not isinstance(package, spack.CMakePackage):
raise RuntimeError(
'Support for {0} not yet implemented'.format(type(package)))
write_spconfig(package)