Get Rid of nobuild, nolink, and alldeps (#2765)
* Removing the nobuild, nolink, and alldeps dependency types in favor of being explicit. * This will help with maintenance going forward, as adding more dependency types won't affect existing declared dependencies in weird ways. * default deptype is still `('build', 'link')`
This commit is contained in:

committed by
Todd Gamblin

parent
68baac0549
commit
402dfe30f9
@@ -1507,11 +1507,7 @@ Additional hybrid dependency types are (note the lack of quotes):
|
||||
|
||||
* **<not specified>**: ``type`` assumed to be ``("build",
|
||||
"link")``. This is the common case for compiled language usage.
|
||||
* **alldeps**: All dependency types. **Note:** No quotes here
|
||||
* **nolink**: Equal to ``("build", "run")``, for use by dependencies
|
||||
that are not expressed via a linker (e.g., Python or Lua module
|
||||
loading). **Note:** No quotes here
|
||||
|
||||
|
||||
"""""""""""""""""""
|
||||
Dependency Formulas
|
||||
"""""""""""""""""""
|
||||
@@ -3110,7 +3106,6 @@ dependencies as well. This is equivalent to
|
||||
|
||||
* Any combination of ``build``, ``link``, and ``run`` separated by
|
||||
commas.
|
||||
* ``nobuild``, ``nolink``, ``norun`` to omit one type.
|
||||
* ``all`` or ``alldeps`` for all types of dependencies.
|
||||
|
||||
You can also use ``spack graph`` to generate graphs in the widely used
|
||||
|
2
lib/spack/external/_pytest/freeze_support.py
vendored
2
lib/spack/external/_pytest/freeze_support.py
vendored
@@ -42,4 +42,4 @@ def _iter_all_modules(package, prefix=''):
|
||||
for m in _iter_all_modules(os.path.join(path, name), prefix=name + '.'):
|
||||
yield prefix + m
|
||||
else:
|
||||
yield prefix + name
|
||||
yield prefix + name
|
||||
|
@@ -166,8 +166,8 @@
|
||||
from spack.version import Version, ver
|
||||
__all__ += ['Version', 'ver']
|
||||
|
||||
from spack.spec import Spec, alldeps, nolink
|
||||
__all__ += ['Spec', 'alldeps', 'nolink']
|
||||
from spack.spec import Spec, alldeps
|
||||
__all__ += ['Spec', 'alldeps']
|
||||
|
||||
from spack.multimethod import when
|
||||
__all__ += ['when']
|
||||
|
@@ -200,7 +200,7 @@ class PythonGuess(DefaultGuess):
|
||||
|
||||
# FIXME: Add additional dependencies if required.
|
||||
# depends_on('py-setuptools', type='build')
|
||||
# depends_on('py-foo', type=nolink)"""
|
||||
# depends_on('py-foo', type=('build', 'run'))"""
|
||||
|
||||
body = """\
|
||||
def install(self, spec, prefix):
|
||||
@@ -216,7 +216,7 @@ class RGuess(DefaultGuess):
|
||||
"""Provides appropriate overrides for R extensions"""
|
||||
dependencies = """\
|
||||
# FIXME: Add dependencies if required.
|
||||
# depends_on('r-foo', type=nolink)"""
|
||||
# depends_on('r-foo', type=('build', 'run'))"""
|
||||
|
||||
body = """\
|
||||
# FIXME: Override install() if necessary."""
|
||||
@@ -232,7 +232,7 @@ class OctaveGuess(DefaultGuess):
|
||||
extends('octave')
|
||||
|
||||
# FIXME: Add additional dependencies if required.
|
||||
# depends_on('octave-foo', type=nolink)"""
|
||||
# depends_on('octave-foo', type=('build', 'run'))"""
|
||||
|
||||
body = """\
|
||||
def install(self, spec, prefix):
|
||||
|
@@ -68,7 +68,7 @@
|
||||
_db_lock_timeout = 60
|
||||
|
||||
# Types of dependencies tracked by the database
|
||||
_tracked_deps = 'nobuild'
|
||||
_tracked_deps = ('link', 'run')
|
||||
|
||||
|
||||
def _autospec(function):
|
||||
|
@@ -126,8 +126,6 @@
|
||||
__all__ = [
|
||||
'Spec',
|
||||
'alldeps',
|
||||
'nolink',
|
||||
'nobuild',
|
||||
'canonical_deptype',
|
||||
'validate_deptype',
|
||||
'parse',
|
||||
@@ -188,14 +186,10 @@
|
||||
|
||||
# Special types of dependencies.
|
||||
alldeps = ('build', 'link', 'run')
|
||||
nolink = ('build', 'run')
|
||||
nobuild = ('link', 'run')
|
||||
norun = ('link', 'build')
|
||||
special_types = {
|
||||
'alldeps': alldeps,
|
||||
'all': alldeps, # allow "all" as string but not symbol.
|
||||
'nolink': nolink,
|
||||
'nobuild': nobuild,
|
||||
'norun': norun,
|
||||
}
|
||||
|
||||
|
@@ -511,4 +511,4 @@ def get_rev():
|
||||
|
||||
t = Bunch(checks=checks, url=url, hash=get_rev, path=str(repodir))
|
||||
yield t
|
||||
current.chdir()
|
||||
current.chdir()
|
||||
|
Reference in New Issue
Block a user