Make spec.format properties case-insensitive
This commit is contained in:

committed by
Todd Gamblin

parent
74b439b7f1
commit
9a585e6c6a
@@ -2209,6 +2209,9 @@ def format(self, format_string='$_$@$%@+$+$=', **kwargs):
|
||||
${SPACK_PREFIX}/opt
|
||||
${PREFIX} The package prefix
|
||||
|
||||
Note these are case-insensitive: for example you can specify either
|
||||
``${PACKAGE}`` or ``${package}``.
|
||||
|
||||
Optionally you can provide a width, e.g. ``$20_`` for a 20-wide name.
|
||||
Like printf, you can provide '-' for left justification, e.g.
|
||||
``$-20_`` for a left-justified name.
|
||||
@@ -2299,6 +2302,7 @@ def write(s, c):
|
||||
"'%s'" % format_string)
|
||||
named_str += c
|
||||
continue
|
||||
named_str = named_str.upper()
|
||||
if named_str == 'PACKAGE':
|
||||
name = self.name if self.name else ''
|
||||
write(fmt % self.name, '@')
|
||||
|
Reference in New Issue
Block a user