Restore default RPATH settings but allow packages to limit to immediate deps. (#1954)

- Some packages (netcdf) NEED RPATHs for transitive deps.
- Others (dealii) will exceed OS limits when the DAG is too large.
This commit is contained in:
Todd Gamblin 2016-10-06 15:57:23 -07:00 committed by GitHub
parent 9683e0df07
commit dbc864c9db
3 changed files with 18 additions and 2 deletions

View File

@ -383,7 +383,10 @@ def set_module_variables_for_package(pkg, module):
def get_rpath_deps(pkg): def get_rpath_deps(pkg):
"""We only need to RPATH immediate dependencies.""" """Return immediate or transitive RPATHs depending on the package."""
if pkg.transitive_rpaths:
return [d for d in pkg.spec.traverse(root=False, deptype=('link'))]
else:
return pkg.spec.dependencies(deptype='link') return pkg.spec.dependencies(deptype='link')

View File

@ -310,17 +310,26 @@ class SomePackage(Package):
# #
"""By default we build in parallel. Subclasses can override this.""" """By default we build in parallel. Subclasses can override this."""
parallel = True parallel = True
"""# jobs to use for parallel make. If set, overrides default of ncpus.""" """# jobs to use for parallel make. If set, overrides default of ncpus."""
make_jobs = None make_jobs = None
"""By default do not run tests within package's install()""" """By default do not run tests within package's install()"""
run_tests = False run_tests = False
"""Most packages are NOT extendable. Set to True if you want extensions.""" """Most packages are NOT extendable. Set to True if you want extensions."""
extendable = False extendable = False
"""When True, add RPATHs for the entire DAG. When False, add RPATHs only
for immediate dependencies."""
transitive_rpaths = True
"""List of prefix-relative file paths (or a single path). If these do """List of prefix-relative file paths (or a single path). If these do
not exist after install, or if they exist but are not files, not exist after install, or if they exist but are not files,
sanity checks fail. sanity checks fail.
""" """
sanity_check_is_file = [] sanity_check_is_file = []
"""List of prefix-relative directory paths (or a single path). If """List of prefix-relative directory paths (or a single path). If
these do not exist after install, or if they exist but are not these do not exist after install, or if they exist but are not
directories, sanity checks will fail. directories, sanity checks will fail.

View File

@ -32,6 +32,10 @@ class Dealii(Package):
homepage = "https://www.dealii.org" homepage = "https://www.dealii.org"
url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz" url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz"
# Don't add RPATHs to this package for the full build DAG.
# only add for immediate deps.
transitive_rpaths = False
version('8.4.2', '84c6bd3f250d3e0681b645d24cb987a7') version('8.4.2', '84c6bd3f250d3e0681b645d24cb987a7')
version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d') version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d')
version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00')