install/install_tree: glob support (#18376)

* install/install_tree: glob support

* Add unit tests

* Update existing packages

* Raise error if glob finds no files, document function raises
This commit is contained in:
Adam J. Stewart
2020-09-03 12:47:19 -05:00
committed by GitHub
parent 098beee295
commit 741bb9bafe
48 changed files with 276 additions and 370 deletions

View File

@@ -3,8 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import sys
@@ -115,9 +113,8 @@ def install_headers(self):
# grab the full binutils set of headers
install_tree('include', extradir)
# also grab the headers from the bfd directory
for current_file in glob.glob(join_path(self.build_directory,
'bfd', '*.h')):
install(current_file, extradir)
install(join_path(self.build_directory, 'bfd', '*.h'),
extradir)
def flag_handler(self, name, flags):
# To ignore the errors of narrowing conversions for