diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index 4f1bd9993c..0acdea9d38 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -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)) - cfg.write("# python module install dir\n") - cfg.write(cmake_cache_entry("PYTHON_MODULE_INSTALL_PREFIX", - site_packages_dir)) + 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"))