spack external find: add search path customization (#30479)
This commit is contained in:
parent
a5d06325e7
commit
e6346eb033
@ -37,6 +37,9 @@ def setup_parser(subparser):
|
|||||||
find_parser.add_argument(
|
find_parser.add_argument(
|
||||||
'--not-buildable', action='store_true', default=False,
|
'--not-buildable', action='store_true', default=False,
|
||||||
help="packages with detected externals won't be built with Spack")
|
help="packages with detected externals won't be built with Spack")
|
||||||
|
find_parser.add_argument(
|
||||||
|
'-p', '--path', default=None, action='append',
|
||||||
|
help="Alternative search paths for finding externals. May be repeated")
|
||||||
find_parser.add_argument(
|
find_parser.add_argument(
|
||||||
'--scope', choices=scopes, metavar=scopes_metavar,
|
'--scope', choices=scopes, metavar=scopes_metavar,
|
||||||
default=spack.config.default_modify_scope('packages'),
|
default=spack.config.default_modify_scope('packages'),
|
||||||
@ -124,8 +127,10 @@ def external_find(args):
|
|||||||
if not args.tags and not packages_to_check:
|
if not args.tags and not packages_to_check:
|
||||||
packages_to_check = spack.repo.path.all_packages()
|
packages_to_check = spack.repo.path.all_packages()
|
||||||
|
|
||||||
detected_packages = spack.detection.by_executable(packages_to_check)
|
detected_packages = spack.detection.by_executable(
|
||||||
detected_packages.update(spack.detection.by_library(packages_to_check))
|
packages_to_check, path_hints=args.path)
|
||||||
|
detected_packages.update(spack.detection.by_library(
|
||||||
|
packages_to_check, path_hints=args.path))
|
||||||
|
|
||||||
new_entries = spack.detection.update_configuration(
|
new_entries = spack.detection.update_configuration(
|
||||||
detected_packages, scope=args.scope, buildable=not args.not_buildable
|
detected_packages, scope=args.scope, buildable=not args.not_buildable
|
||||||
|
@ -1024,7 +1024,7 @@ _spack_external() {
|
|||||||
_spack_external_find() {
|
_spack_external_find() {
|
||||||
if $list_options
|
if $list_options
|
||||||
then
|
then
|
||||||
SPACK_COMPREPLY="-h --help --not-buildable --scope --all -t --tag"
|
SPACK_COMPREPLY="-h --help --not-buildable -p --path --scope --all -t --tag"
|
||||||
else
|
else
|
||||||
_all_packages
|
_all_packages
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user