diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2017-03-23 12:28:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-23 12:28:17 -0500 |
commit | ace890af49645d264a2d3ec0ac93e53dd43278d5 (patch) | |
tree | 14af0bc38c38819c5ee70afb754ce9acec928335 /var | |
parent | 4e8a59a06213fb9e71feb728a5892baf6aed5959 (diff) | |
download | spack-ace890af49645d264a2d3ec0ac93e53dd43278d5.tar.gz spack-ace890af49645d264a2d3ec0ac93e53dd43278d5.tar.bz2 spack-ace890af49645d264a2d3ec0ac93e53dd43278d5.tar.xz spack-ace890af49645d264a2d3ec0ac93e53dd43278d5.zip |
Only configure requested lammps features (#3526)
* Only configure requested lammps features
* Run configure from root and make from src
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/lammps/package.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index 61c7b22980..6c80873f14 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -24,7 +24,6 @@ ############################################################################## from spack import * import os -import string import datetime as dt @@ -178,16 +177,16 @@ class Lammps(MakefilePackage): def build(self, spec, prefix): for pkg in self.supported_packages: - _build_pkg_name = string.replace('build_{0}'.format(pkg), '-', '_') - if hasattr(self, _build_pkg_name): - _build_pkg = getattr(self, _build_pkg_name) - _build_pkg() + if '+{0}'.format(pkg) in spec: + _build_pkg_name = 'build_{0}'.format(pkg.replace('-', '_')) + if hasattr(self, _build_pkg_name): + _build_pkg = getattr(self, _build_pkg_name) + _build_pkg() - with working_dir('src'): - for pkg in self.supported_packages: - if '+{0}'.format(pkg) in spec: + with working_dir('src'): make('yes-{0}'.format(pkg)) + with working_dir('src'): make(self.target_name) if '+lib' in spec: |