diff options
author | Peter J. Scheibel <scheibel1@llnl.gov> | 2016-11-04 11:10:13 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-11-04 11:41:20 -0700 |
commit | 9a585e6c6a7208dc4cb2b4958e8c654f022d7ea3 (patch) | |
tree | 627a8dc0d8ebd2cfc5d60017dfae86b4d2c59050 | |
parent | 74b439b7f18c4fde0167320a9166bd0a28eedc77 (diff) | |
download | spack-9a585e6c6a7208dc4cb2b4958e8c654f022d7ea3.tar.gz spack-9a585e6c6a7208dc4cb2b4958e8c654f022d7ea3.tar.bz2 spack-9a585e6c6a7208dc4cb2b4958e8c654f022d7ea3.tar.xz spack-9a585e6c6a7208dc4cb2b4958e8c654f022d7ea3.zip |
Make spec.format properties case-insensitive
-rw-r--r-- | lib/spack/spack/spec.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 83d92bd502..cbcb2199f6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2209,6 +2209,9 @@ class Spec(object): ${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 @@ class Spec(object): "'%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, '@') |