If a spec contains more than one key=value pair or the key=value pair is not at the end of the spec, parsing breaks:
$ spack spec "py-matplotlib backend=agg target=x86_64 +image ^python@3.7.5"
Input spec
--------------------------------
py-matplotlib backend=agg target=x86_64 +image ^python@3.7.5
Concretized
--------------------------------
==> Error: invalid values for variant "backend" in package "py-matplotlib": ['agg target=x86_64 +image ^python@3.7.5']
This is due to the fact that the regexp for matching the value part only checks for a non-whitespace character at the start and then matches everything (one-line PR incoming).
If a spec contains more than one
key=valuepair or thekey=valuepair is not at the end of the spec, parsing breaks:This is due to the fact that the regexp for matching the value part only checks for a non-whitespace character at the start and then matches everything (one-line PR incoming).