Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release/1.5.0: Bug fix for spack stack setup-meta-modules extension when no Python is built/used #323

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 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,21 @@ 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