Пример #1
0
def spec():
    return Args('spec', nargs=argparse.REMAINDER, help='package spec')
Пример #2
0
def specs():
    return Args('specs',
                nargs=argparse.REMAINDER,
                help='one or more package specs')
Пример #3
0
def package():
    return Args('package', help='package name')
Пример #4
0
def packages():
    return Args('packages',
                nargs='+',
                help='one or more package names',
                metavar='package')
Пример #5
0
def very_long():
    return Args('-L',
                '--very-long',
                action='store_true',
                help='show full dependency hashes as well as versions')
Пример #6
0
def install_status():
    return Args(
        '-I', '--install-status', action='store_true', default=False,
        help='show install status of packages. packages can be: '
        'installed [+], missing and needed by an installed package [-], '
        'or not installed (no annotation)')
Пример #7
0
def jobs():
    return Args(
        '-j', '--jobs', action=SetParallelJobs, type=int, dest='jobs',
        help='explicitly set number of parallel jobs')
Пример #8
0
def recurse_dependencies():
    return Args('-r',
                '--dependencies',
                action='store_true',
                dest='recurse_dependencies',
                help='recursively traverse spec dependencies')
Пример #9
0
def deptype():
    return Args(
        '--deptype', action=DeptypeAction, default=dep.all_deptypes,
        help="comma-separated list of deptypes to traverse\ndefault=%s"
        % ','.join(dep.all_deptypes))
Пример #10
0
def tags():
    return Args(
        '-t', '--tag', action='append', dest='tags', metavar='TAG',
        help='filter a package query by tag (multiple use allowed)')
Пример #11
0
def recurse_dependents():
    return Args(
        '-R', '--dependents', action='store_true', dest='dependents',
        help='also uninstall any packages that depend on the ones given '
        'via command line')
Пример #12
0
def yes_to_all():
    return Args(
        '-y', '--yes-to-all', action='store_true', dest='yes_to_all',
        help='assume "yes" is the answer to every confirmation request')
Пример #13
0
def tags():
    return Args('-t',
                '--tags',
                action='append',
                help='filter a package query by tags')
Пример #14
0
def installed_spec():
    return Args('spec',
                nargs=argparse.REMAINDER,
                help='installed package spec',
                metavar='installed_spec')
Пример #15
0
def no_checksum():
    return Args(
        '-n', '--no-checksum', action='store_true', default=False,
        help="do not use checksums to verify downloaded files (unsafe)")
Пример #16
0
def installed_specs():
    return Args('specs',
                nargs=argparse.REMAINDER,
                help='one or more installed package specs',
                metavar='installed_specs')
Пример #17
0
def reuse():
    return Args(
        '--reuse', action='store_true', default=False,
        help='reuse installed dependencies'
    )
Пример #18
0
def long():
    return Args('-l',
                '--long',
                action='store_true',
                help='show dependency hashes as well as versions')
Пример #19
0
def constraint():
    return Args('constraint',
                nargs=argparse.REMAINDER,
                action=ConstraintAction,
                help='constraint to select a subset of installed packages',
                metavar='installed_specs')
Пример #20
0
def deprecated():
    return Args('--deprecated',
                action='store_true',
                default=False,
                help='fetch deprecated versions without warning')
Пример #21
0
        kwargs['default'] = spack.dirty
        super(CleanOrDirtyAction, self).__init__(*args, **kwargs)

    def __call__(self, parser, namespace, values, option_string=None):
        if option_string == '--clean':
            setattr(namespace, self.dest, False)
        elif option_string == '--dirty':
            setattr(namespace, self.dest, True)
        else:
            msg = 'expected "--dirty" or "--clean" [got {0} instead]'
            raise argparse.ArgumentError(msg.format(option_string))


_arguments['constraint'] = Args(
    'constraint',
    nargs=argparse.REMAINDER,
    action=ConstraintAction,
    help='constraint to select a subset of installed packages')

_arguments['module_type'] = Args(
    '-m',
    '--module-type',
    choices=spack.modules.module_types.keys(),
    action='append',
    help=
    'type of module file. More than one choice is allowed [default: all available module types]'
)  # NOQA: ignore=E501

_arguments['yes_to_all'] = Args(
    '-y',
    '--yes-to-all',