diff options
author | Cyrus Harrison <cyrush@llnl.gov> | 2021-04-21 08:21:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 10:21:21 -0500 |
commit | a97ef832d90158cde81b74e29a0cd90d3df66f4c (patch) | |
tree | 1373d55be8cb5faa4c48f510121f00e96fdbcf4e /var | |
parent | 8182994ceea03f55b69ef8735e6ef5ad7a32cf5b (diff) | |
download | spack-a97ef832d90158cde81b74e29a0cd90d3df66f4c.tar.gz spack-a97ef832d90158cde81b74e29a0cd90d3df66f4c.tar.bz2 spack-a97ef832d90158cde81b74e29a0cd90d3df66f4c.tar.xz spack-a97ef832d90158cde81b74e29a0cd90d3df66f4c.zip |
conduit package: avoid issue with subclass case (#23156)
* avoid issue with subclass case
* catch named exception
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/conduit/package.py | 10 |
1 files changed, 7 insertions, 3 deletions
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 @@ class Conduit(CMakePackage): 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")) |