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
This commit is contained in:
Greg Becker
2019-04-17 18:21:40 -07:00
committed by Todd Gamblin
parent 49334f006d
commit f242f5f8a9
42 changed files with 568 additions and 180 deletions

View File

@@ -397,7 +397,7 @@ def write_rpath_specs(self):
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

View File

@@ -67,7 +67,9 @@ def patch(self):
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."""

View File

@@ -42,7 +42,9 @@ def patch(self):
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."""