filter_compiler_path: added the possibility to narrow search path

Following a comment from Todd, the search path for the files listed in
`filter_compiler_wrappers` can now be narrowed. Anyhow, the function
implementation still makes use of `find`, the rationale being that we
have already seen packages that install artifacts in e.g. architecture
dependent folders. The possibility to have a relative search path might
be a good compromise between the previous approach and the one suggested
in the review.

Also: 'ignore_absent' and 'backup' keyword arguments can be optionally
forwarded to `filter_file`.
This commit is contained in:
alalazo
2017-08-02 15:37:52 +02:00
committed by Todd Gamblin
parent 4e48bae096
commit c62b3eef55
6 changed files with 45 additions and 15 deletions

View File

@@ -97,7 +97,7 @@ class Hdf5(AutotoolsPackage):
patch('h5f90global-mult-obj-same-equivalence-same-common-block.patch',
when='@1.10.1%intel@18')
filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc')
filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc', relative_root='bin')
def url_for_version(self, version):
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{0}/hdf5-{1}/src/hdf5-{1}.tar.gz"

View File

@@ -71,7 +71,9 @@ class Mpich(AutotoolsPackage):
provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:')
filter_compiler_wrappers('mpicc', 'mpicxx', 'mpif77', 'mpif90')
filter_compiler_wrappers(
'mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort', relative_root='bin'
)
# fix MPI_Barrier segmentation fault
# see https://lists.mpich.org/pipermail/discuss/2016-May/004764.html

View File

@@ -107,7 +107,9 @@ class Mvapich2(AutotoolsPackage):
depends_on('libpciaccess', when=(sys.platform != 'darwin'))
depends_on('cuda', when='+cuda')
filter_compiler_wrappers('mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort')
filter_compiler_wrappers(
'mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort', relative_root='bin'
)
def url_for_version(self, version):
base_url = "http://mvapich.cse.ohio-state.edu/download"

View File

@@ -228,7 +228,8 @@ class Openmpi(AutotoolsPackage):
'mpif90-vt-wrapper-data.txt',
'mpif90-wrapper-data.txt',
'mpif77-vt-wrapper-data.txt',
'mpif77-wrapper-data.txt'
'mpif77-wrapper-data.txt',
relative_root=os.path.join('share', 'openmpi')
)
def url_for_version(self, version):

View File

@@ -88,7 +88,9 @@ class R(AutotoolsPackage):
patch('zlib.patch', when='@:3.3.2')
filter_compiler_wrappers('Makeconf')
filter_compiler_wrappers(
'Makeconf', relative_root=os.path.join('rlib', 'R', 'etc')
)
@property
def etcdir(self):