diff options
author | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2016-10-25 16:53:11 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-25 07:53:11 -0700 |
commit | b27e78cd78dae11f7fa7cc2ba3849cfcff2e1880 (patch) | |
tree | 71257154ff035f2d5adc436ac2f05d4efd9900fd /lib | |
parent | d7b624457ff3765c35e4adb9be70d1a2e86e0f2e (diff) | |
download | spack-b27e78cd78dae11f7fa7cc2ba3849cfcff2e1880.tar.gz spack-b27e78cd78dae11f7fa7cc2ba3849cfcff2e1880.tar.bz2 spack-b27e78cd78dae11f7fa7cc2ba3849cfcff2e1880.tar.xz spack-b27e78cd78dae11f7fa7cc2ba3849cfcff2e1880.zip |
spack setup : fixed regression after #1186 (#2117)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/setup.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py index 50bc031330..15bd5e6562 100644 --- a/lib/spack/spack/cmd/setup.py +++ b/lib/spack/spack/cmd/setup.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import argparse +import copy import os import string import sys @@ -30,10 +31,11 @@ import sys import llnl.util.tty as tty import spack import spack.cmd +import spack.cmd.install as install +from llnl.util.filesystem import set_executable from spack import which from spack.cmd.edit import edit_package from spack.stage import DIYStage -from llnl.util.filesystem import set_executable description = "Create a configuration script and module, but don't build." @@ -163,4 +165,26 @@ def setup(self, args): # TODO: make this an argument, not a global. spack.do_checksum = False + # Install dependencies if requested to do so + if not args.ignore_deps: + parser = argparse.ArgumentParser() + install.setup_parser(parser) + inst_args = copy.deepcopy(args) + inst_args = parser.parse_args( + ['--only=dependencies'] + args.spec, + namespace=inst_args + ) + install.install(parser, inst_args) + # Generate spconfig.py + tty.msg( + 'Generating spconfig.py [{0}]'.format(package.spec.cshort_spec) + ) write_spconfig(package) + # Install this package to register it in the DB and permit + # module file regeneration + inst_args = copy.deepcopy(args) + inst_args = parser.parse_args( + ['--only=package', '--fake'] + args.spec, + namespace=inst_args + ) + install.install(parser, inst_args) |