New interface for passing build information among specs (#1875)
- Added a new interface for Specs to pass build information - Calls forwarded from Spec to Package are now explicit - Added descriptor within Spec to manage forwarding - Added state in Spec to maintain query information - Modified a few packages (the one involved in spack install pexsi) to showcase changes - This uses an object wrapper to `spec` to implement the `libs` sub-calls. - wrapper is returned from `__getitem__` only if spec is concrete - allows packagers to access build information easily
This commit is contained in:

committed by
Todd Gamblin

parent
5ce926d2d1
commit
ed582cef68
@@ -116,6 +116,18 @@ def url_for_version(self, version):
|
||||
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (
|
||||
version.up_to(2), version)
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
query_parameters = self.spec.last_query.extra_parameters
|
||||
libraries = ['libmpi']
|
||||
|
||||
if 'cxx' in query_parameters:
|
||||
libraries = ['libmpi_cxx'] + libraries
|
||||
|
||||
return find_libraries(
|
||||
libraries, root=self.prefix, shared=True, recurse=True
|
||||
)
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc'))
|
||||
spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpic++'))
|
||||
|
Reference in New Issue
Block a user