Add help for buildcache, reorganize command help categories
- Add proper help for `spack buildcache` subcommands - Reorganize the help categories of Spack commands so that buildcache is in packaging and diy and setup are now in build.
This commit is contained in:
parent
2b7dfcd19f
commit
8f52de32b6
@ -34,8 +34,8 @@
|
|||||||
from spack.binary_distribution import NoKeyException, PickKeyException
|
from spack.binary_distribution import NoKeyException, PickKeyException
|
||||||
from spack.binary_distribution import NoVerifyException, NoChecksumException
|
from spack.binary_distribution import NoVerifyException, NoChecksumException
|
||||||
|
|
||||||
description = "Create, download and install build cache files."
|
description = "create, download and install binary packages"
|
||||||
section = "caching"
|
section = "packaging"
|
||||||
level = "long"
|
level = "long"
|
||||||
|
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ def setup_parser(subparser):
|
|||||||
setup_parser.parser = subparser
|
setup_parser.parser = subparser
|
||||||
subparsers = subparser.add_subparsers(help='buildcache sub-commands')
|
subparsers = subparser.add_subparsers(help='buildcache sub-commands')
|
||||||
|
|
||||||
create = subparsers.add_parser('create')
|
create = subparsers.add_parser('create', help=createtarball.__doc__)
|
||||||
create.add_argument('-r', '--rel', action='store_true',
|
create.add_argument('-r', '--rel', action='store_true',
|
||||||
help="make all rpaths relative" +
|
help="make all rpaths relative" +
|
||||||
" before creating tarballs.")
|
" before creating tarballs.")
|
||||||
@ -63,7 +63,7 @@ def setup_parser(subparser):
|
|||||||
help="specs of packages to create buildcache for")
|
help="specs of packages to create buildcache for")
|
||||||
create.set_defaults(func=createtarball)
|
create.set_defaults(func=createtarball)
|
||||||
|
|
||||||
install = subparsers.add_parser('install')
|
install = subparsers.add_parser('install', help=installtarball.__doc__)
|
||||||
install.add_argument('-f', '--force', action='store_true',
|
install.add_argument('-f', '--force', action='store_true',
|
||||||
help="overwrite install directory if it exists.")
|
help="overwrite install directory if it exists.")
|
||||||
install.add_argument('-y', '--yes-to-all', action='store_true',
|
install.add_argument('-y', '--yes-to-all', action='store_true',
|
||||||
@ -74,7 +74,7 @@ def setup_parser(subparser):
|
|||||||
help="specs of packages to install biuldache for")
|
help="specs of packages to install biuldache for")
|
||||||
install.set_defaults(func=installtarball)
|
install.set_defaults(func=installtarball)
|
||||||
|
|
||||||
listcache = subparsers.add_parser('list')
|
listcache = subparsers.add_parser('list', help=listspecs.__doc__)
|
||||||
listcache.add_argument('-f', '--force', action='store_true',
|
listcache.add_argument('-f', '--force', action='store_true',
|
||||||
help="force new download of specs")
|
help="force new download of specs")
|
||||||
listcache.add_argument(
|
listcache.add_argument(
|
||||||
@ -82,7 +82,7 @@ def setup_parser(subparser):
|
|||||||
help="specs of packages to search for")
|
help="specs of packages to search for")
|
||||||
listcache.set_defaults(func=listspecs)
|
listcache.set_defaults(func=listspecs)
|
||||||
|
|
||||||
dlkeys = subparsers.add_parser('keys')
|
dlkeys = subparsers.add_parser('keys', help=getkeys.__doc__)
|
||||||
dlkeys.add_argument(
|
dlkeys.add_argument(
|
||||||
'-i', '--install', action='store_true',
|
'-i', '--install', action='store_true',
|
||||||
help="install Keys pulled from mirror")
|
help="install Keys pulled from mirror")
|
||||||
@ -179,6 +179,7 @@ def match_downloaded_specs(pkgs, allow_multiple_matches=False, force=False):
|
|||||||
|
|
||||||
|
|
||||||
def createtarball(args):
|
def createtarball(args):
|
||||||
|
"""create a binary package from an existing install"""
|
||||||
if not args.packages:
|
if not args.packages:
|
||||||
tty.die("build cache file creation requires at least one" +
|
tty.die("build cache file creation requires at least one" +
|
||||||
" installed package argument")
|
" installed package argument")
|
||||||
@ -240,6 +241,7 @@ def createtarball(args):
|
|||||||
|
|
||||||
|
|
||||||
def installtarball(args):
|
def installtarball(args):
|
||||||
|
"""install from a binary package"""
|
||||||
if not args.packages:
|
if not args.packages:
|
||||||
tty.die("build cache file installation requires" +
|
tty.die("build cache file installation requires" +
|
||||||
" at least one package spec argument")
|
" at least one package spec argument")
|
||||||
@ -296,6 +298,7 @@ def install_tarball(spec, args):
|
|||||||
|
|
||||||
|
|
||||||
def listspecs(args):
|
def listspecs(args):
|
||||||
|
"""list binary packages available from mirrors"""
|
||||||
specs = bindist.get_specs(args.force)
|
specs = bindist.get_specs(args.force)
|
||||||
if args.packages:
|
if args.packages:
|
||||||
pkgs = set(args.packages)
|
pkgs = set(args.packages)
|
||||||
@ -318,6 +321,7 @@ def listspecs(args):
|
|||||||
|
|
||||||
|
|
||||||
def getkeys(args):
|
def getkeys(args):
|
||||||
|
"""get public keys available on mirrors"""
|
||||||
install = False
|
install = False
|
||||||
if args.install:
|
if args.install:
|
||||||
install = True
|
install = True
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
from spack.stage import DIYStage
|
from spack.stage import DIYStage
|
||||||
|
|
||||||
description = "do-it-yourself: build from an existing source directory"
|
description = "do-it-yourself: build from an existing source directory"
|
||||||
section = "developer"
|
section = "build"
|
||||||
level = "long"
|
level = "long"
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
description = "handle GPG actions for spack"
|
description = "handle GPG actions for spack"
|
||||||
section = "developer"
|
section = "packaging"
|
||||||
level = "long"
|
level = "long"
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
from spack.stage import DIYStage
|
from spack.stage import DIYStage
|
||||||
|
|
||||||
description = "create a configuration script and module, but don't build"
|
description = "create a configuration script and module, but don't build"
|
||||||
section = "developer"
|
section = "build"
|
||||||
level = "long"
|
level = "long"
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,8 @@
|
|||||||
section_order = {
|
section_order = {
|
||||||
'basic': ['list', 'info', 'find'],
|
'basic': ['list', 'info', 'find'],
|
||||||
'build': ['fetch', 'stage', 'patch', 'configure', 'build', 'restage',
|
'build': ['fetch', 'stage', 'patch', 'configure', 'build', 'restage',
|
||||||
'install', 'uninstall', 'clean']
|
'install', 'uninstall', 'clean'],
|
||||||
|
'packaging': ['create', 'edit']
|
||||||
}
|
}
|
||||||
|
|
||||||
# Properties that commands are required to set.
|
# Properties that commands are required to set.
|
||||||
|
Loading…
Reference in New Issue
Block a user