env: rename 'spack env' command to 'spack build-env'

This commit is contained in:
Peter Josef Scheibel 2018-05-18 15:22:55 -07:00 committed by Todd Gamblin
parent bb8da72f0c
commit e6c6ab64b8
2 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@
import os import os
import llnl.util.tty as tty import llnl.util.tty as tty
import spack.build_environment as build_env import spack.build_environment as build_environment
import spack.cmd import spack.cmd
import spack.cmd.common.arguments as arguments import spack.cmd.common.arguments as arguments
@ -25,9 +25,9 @@ def setup_parser(subparser):
help="specs of package environment to emulate") help="specs of package environment to emulate")
def env(parser, args): def build_env(parser, args):
if not args.spec: if not args.spec:
tty.die("spack env requires a spec.") tty.die("spack build-env requires a spec.")
# Specs may have spaces in them, so if they do, require that the # Specs may have spaces in them, so if they do, require that the
# caller put a '--' between the spec and the command to be # caller put a '--' between the spec and the command to be
@ -44,10 +44,10 @@ def env(parser, args):
specs = spack.cmd.parse_specs(spec, concretize=True) specs = spack.cmd.parse_specs(spec, concretize=True)
if len(specs) > 1: if len(specs) > 1:
tty.die("spack env only takes one spec.") tty.die("spack build-env only takes one spec.")
spec = specs[0] spec = specs[0]
build_env.setup_package(spec.package, args.dirty) build_environment.setup_package(spec.package, args.dirty)
if not cmd: if not cmd:
# If no command act like the "env" command and print out env vars. # If no command act like the "env" command and print out env vars.

View file

@ -7,7 +7,7 @@
from spack.main import SpackCommand, SpackCommandError from spack.main import SpackCommand, SpackCommandError
info = SpackCommand('env') info = SpackCommand('build-env')
@pytest.mark.parametrize('pkg', [ @pytest.mark.parametrize('pkg', [