diff options
-rw-r--r-- | lib/spack/spack/repo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 6e4c0a2f49..d726fafacc 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -9,6 +9,7 @@ import contextlib import errno import functools import inspect +import itertools import os import re import shutil @@ -921,7 +922,9 @@ class Repo(object): # Install patch files needed by the package. mkdirp(path) - for patch in spec.patches: + for patch in itertools.chain.from_iterable( + spec.package.patches.values()): + if patch.path: if os.path.exists(patch.path): install(patch.path, path) |