conduit package: avoid issue with subclass case (#23156)
* avoid issue with subclass case * catch named exception
This commit is contained in:
parent
8182994cee
commit
a97ef832d9
1 changed files with 7 additions and 3 deletions
|
@ -422,9 +422,13 @@ def hostconfig(self, spec, prefix):
|
|||
cfg.write("# python from spack \n")
|
||||
cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE",
|
||||
spec['python'].command.path))
|
||||
try:
|
||||
cfg.write("# python module install dir\n")
|
||||
cfg.write(cmake_cache_entry("PYTHON_MODULE_INSTALL_PREFIX",
|
||||
site_packages_dir))
|
||||
except NameError:
|
||||
# spack's won't exist in a subclass
|
||||
pass
|
||||
else:
|
||||
cfg.write(cmake_cache_entry("ENABLE_PYTHON", "OFF"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue