conduit package: avoid issue with subclass case (#23156)
* avoid issue with subclass case * catch named exception
This commit is contained in:
@@ -422,9 +422,13 @@ def hostconfig(self, spec, prefix):
|
|||||||
cfg.write("# python from spack \n")
|
cfg.write("# python from spack \n")
|
||||||
cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE",
|
cfg.write(cmake_cache_entry("PYTHON_EXECUTABLE",
|
||||||
spec['python'].command.path))
|
spec['python'].command.path))
|
||||||
|
try:
|
||||||
cfg.write("# python module install dir\n")
|
cfg.write("# python module install dir\n")
|
||||||
cfg.write(cmake_cache_entry("PYTHON_MODULE_INSTALL_PREFIX",
|
cfg.write(cmake_cache_entry("PYTHON_MODULE_INSTALL_PREFIX",
|
||||||
site_packages_dir))
|
site_packages_dir))
|
||||||
|
except NameError:
|
||||||
|
# spack's won't exist in a subclass
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
cfg.write(cmake_cache_entry("ENABLE_PYTHON", "OFF"))
|
cfg.write(cmake_cache_entry("ENABLE_PYTHON", "OFF"))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user