spec.py: remove Spec.virtual_dependencies (#49079)
This commit is contained in:
parent
8639779002
commit
2e372c53ab
@ -3409,12 +3409,20 @@ def _intersects_dependencies(self, other):
|
|||||||
# These two loops handle cases where there is an overly restrictive
|
# These two loops handle cases where there is an overly restrictive
|
||||||
# vpkg in one spec for a provider in the other (e.g., mpi@3: is not
|
# vpkg in one spec for a provider in the other (e.g., mpi@3: is not
|
||||||
# compatible with mpich2)
|
# compatible with mpich2)
|
||||||
for spec in self.virtual_dependencies():
|
for spec in self.traverse():
|
||||||
if spec.name in other_index and not other_index.providers_for(spec):
|
if (
|
||||||
|
spack.repo.PATH.is_virtual(spec.name)
|
||||||
|
and spec.name in other_index
|
||||||
|
and not other_index.providers_for(spec)
|
||||||
|
):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for spec in other.virtual_dependencies():
|
for spec in other.traverse():
|
||||||
if spec.name in self_index and not self_index.providers_for(spec):
|
if (
|
||||||
|
spack.repo.PATH.is_virtual(spec.name)
|
||||||
|
and spec.name in self_index
|
||||||
|
and not self_index.providers_for(spec)
|
||||||
|
):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@ -3558,10 +3566,6 @@ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
|
|||||||
for rhs in other.traverse(root=False)
|
for rhs in other.traverse(root=False)
|
||||||
)
|
)
|
||||||
|
|
||||||
def virtual_dependencies(self):
|
|
||||||
"""Return list of any virtual deps in this spec."""
|
|
||||||
return [spec for spec in self.traverse() if spack.repo.PATH.is_virtual(spec.name)]
|
|
||||||
|
|
||||||
@property # type: ignore[misc] # decorated prop not supported in mypy
|
@property # type: ignore[misc] # decorated prop not supported in mypy
|
||||||
def patches(self):
|
def patches(self):
|
||||||
"""Return patch objects for any patch sha256 sums on this Spec.
|
"""Return patch objects for any patch sha256 sums on this Spec.
|
||||||
|
Loading…
Reference in New Issue
Block a user