diff options
author | Greg Becker <becker33@llnl.gov> | 2019-04-17 18:21:40 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-04-17 18:21:40 -0700 |
commit | f242f5f8a99f6fa5bd2739a4f1fdd9b41c44e92e (patch) | |
tree | d3a2e4b2b94c8507028058055c4fa04f01841ac4 /var | |
parent | 49334f006d54636a5ed9c81093c913c323b65995 (diff) | |
download | spack-f242f5f8a99f6fa5bd2739a4f1fdd9b41c44e92e.tar.gz spack-f242f5f8a99f6fa5bd2739a4f1fdd9b41c44e92e.tar.bz2 spack-f242f5f8a99f6fa5bd2739a4f1fdd9b41c44e92e.tar.xz spack-f242f5f8a99f6fa5bd2739a4f1fdd9b41c44e92e.zip |
Features: Improve Spec format strings (#10556)
* Update spec format to simpler syntax, maintain backwards compatibility
* Switch to new spec.format method throughout internals
* update package files for new format strings
* documentation and minor code cleanup. removed nonsensical variant sigils
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gcc/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/of-adios-write/package.py | 4 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/of-precice/package.py | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 9753a0bb93..0d4a9ace48 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -397,7 +397,7 @@ class Gcc(AutotoolsPackage): the compiler used to build the executable.""" if not self.spec_dir: tty.warn('Could not install specs for {0}.'.format( - self.spec.format('$_$@'))) + self.spec.format('{name}{@version}'))) return gcc = self.spec['gcc'].command diff --git a/var/spack/repos/builtin/packages/of-adios-write/package.py b/var/spack/repos/builtin/packages/of-adios-write/package.py index 541219da0e..f2265cc974 100644 --- a/var/spack/repos/builtin/packages/of-adios-write/package.py +++ b/var/spack/repos/builtin/packages/of-adios-write/package.py @@ -67,7 +67,9 @@ class OfAdiosWrite(Package): add_extra_files(self, self.common, self.assets) # Emit openfoam version immediately, if we resolved the wrong version # it takes a very long time to rebuild! - tty.info('Build for ' + self.spec['openfoam'].format('$_$@$%@+$+')) + tty.info('Build for ' + self.spec['openfoam'].format( + '{name}{@version}{%compiler}{compiler_flags}{variants}' + )) def configure(self, spec, prefix): """Generate spack-config.sh file.""" diff --git a/var/spack/repos/builtin/packages/of-precice/package.py b/var/spack/repos/builtin/packages/of-precice/package.py index 36ed6be5be..82e486dbfc 100644 --- a/var/spack/repos/builtin/packages/of-precice/package.py +++ b/var/spack/repos/builtin/packages/of-precice/package.py @@ -42,7 +42,9 @@ class OfPrecice(Package): add_extra_files(self, self.common, self.assets) # Emit openfoam version immediately, if we resolved the wrong version # it takes a very long time to rebuild! - tty.info('Build for ' + self.spec['openfoam'].format('$_$@$%@+$+')) + tty.info('Build for ' + self.spec['openfoam'].format( + '{name}{@version}{%compiler}{compiler_flags}{variants}' + )) def configure(self, spec, prefix): """Generate spack-config.sh file.""" |