diff options
author | Greg Becker <becker33@llnl.gov> | 2022-05-04 23:59:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 08:59:44 +0200 |
commit | e6346eb0338cb09ec16e9ceb35f994f8706d609c (patch) | |
tree | a14b2b21dab1028dfadd520f832943ab9bb1e08e /lib | |
parent | a5d06325e7e04cd6b8408bce4e7517e2a6099cc5 (diff) | |
download | spack-e6346eb0338cb09ec16e9ceb35f994f8706d609c.tar.gz spack-e6346eb0338cb09ec16e9ceb35f994f8706d609c.tar.bz2 spack-e6346eb0338cb09ec16e9ceb35f994f8706d609c.tar.xz spack-e6346eb0338cb09ec16e9ceb35f994f8706d609c.zip |
spack external find: add search path customization (#30479)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/external.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py index 50d77890fd..8b9c845c3e 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -38,6 +38,9 @@ def setup_parser(subparser): '--not-buildable', action='store_true', default=False, 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( '--scope', choices=scopes, metavar=scopes_metavar, default=spack.config.default_modify_scope('packages'), help="configuration scope to modify") @@ -124,8 +127,10 @@ def external_find(args): if not args.tags and not packages_to_check: packages_to_check = spack.repo.path.all_packages() - detected_packages = spack.detection.by_executable(packages_to_check) - detected_packages.update(spack.detection.by_library(packages_to_check)) + detected_packages = spack.detection.by_executable( + 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( detected_packages, scope=args.scope, buildable=not args.not_buildable |