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
|
${SPACK_PREFIX}/opt
|
||||||
${PREFIX} The package prefix
|
${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.
|
Optionally you can provide a width, e.g. ``$20_`` for a 20-wide name.
|
||||||
Like printf, you can provide '-' for left justification, e.g.
|
Like printf, you can provide '-' for left justification, e.g.
|
||||||
``$-20_`` for a left-justified name.
|
``$-20_`` for a left-justified name.
|
||||||
@@ -2299,6 +2302,7 @@ def write(s, c):
|
|||||||
"'%s'" % format_string)
|
"'%s'" % format_string)
|
||||||
named_str += c
|
named_str += c
|
||||||
continue
|
continue
|
||||||
|
named_str = named_str.upper()
|
||||||
if named_str == 'PACKAGE':
|
if named_str == 'PACKAGE':
|
||||||
name = self.name if self.name else ''
|
name = self.name if self.name else ''
|
||||||
write(fmt % self.name, '@')
|
write(fmt % self.name, '@')
|
||||||
|
Reference in New Issue
Block a user