Skip to content

Commit

Permalink
Bug fix for spack stack setup-meta-modules extension: proceed without…
Browse files Browse the repository at this point in the history
… Python after checking with user
  • Loading branch information
climbfuji committed Sep 12, 2023
1 parent a4675f0 commit b4b475a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/jcsda-emc/spack-stack/stack/meta_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,17 @@ def setup_meta_modules():
python_dict = get_matched_dict(compiler_install_dir, python_candidate_list)
logging.info(" ... stack python providers: '{}'".format(python_dict))
if not python_dict:
raise Exception(
"""No matching Python version found. Make sure that the
Python version in the package config matches what spack installed."""
user_input = input(
"No matching Python version found found, proceed without creating Python modules? (yes/no): "
)
if not user_input.lower() in ["yes", "y"]:
raise Exception(
""""No matching Python version found. Make sure that the
Python version in the package config matches what spack installed."""
)
else:
logging.info("Metamodule generation completed successfully in {}".format(meta_module_dir))
return

for compiler_name in compiler_dict.keys():
for compiler_version in compiler_dict[compiler_name]:
Expand Down

0 comments on commit b4b475a

Please sign in to comment.