summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJordan Galby <67924449+Jordan474@users.noreply.github.com>2021-10-03 16:10:33 +0200
committerGitHub <noreply@github.com>2021-10-03 16:10:33 +0200
commit0d6a2381b27ba10568a5f2d9c1d0e50a23d368fd (patch)
tree74a7da72ac75303d27e534fd14c5f7cd6b866d12 /.github
parentb9e72557e8b52b63244500f226afda0efe798df2 (diff)
downloadspack-0d6a2381b27ba10568a5f2d9c1d0e50a23d368fd.tar.gz
spack-0d6a2381b27ba10568a5f2d9c1d0e50a23d368fd.tar.bz2
spack-0d6a2381b27ba10568a5f2d9c1d0e50a23d368fd.tar.xz
spack-0d6a2381b27ba10568a5f2d9c1d0e50a23d368fd.zip
Fix JSONDecodeError when using compiler modules (#25624)
When using modules for compiler (and/or external package), if a package's `setup_[dependent_]build_environment` sets `PYTHONHOME`, it can influence the python subprocess executed to gather module information. The error seen was: ``` json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ``` But the actual hidden error happened in the `python -c 'import json...'` subprocess, which made it return an empty string as json: ``` ModuleNotFoundError: No module named 'encodings' ``` This fix uses `python -E` to ignore `PYTHONHOME` and `PYTHONPATH`. Should be safe here because the python subprocess code only use packages built-in python. The python subprocess in `environment.py` was also patched to be safe and consistent.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions