summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2023-02-20 12:58:28 -0700
committerGitHub <noreply@github.com>2023-02-20 11:58:28 -0800
commitce9f8143ccfb9e3e2df870420e555c36b5533034 (patch)
tree16741daedcd697da49f495c20eb9de353ba5391a /lib
parentc1ff7bbf04a27f483770c4351e662d7fa8f76686 (diff)
downloadspack-ce9f8143ccfb9e3e2df870420e555c36b5533034.tar.gz
spack-ce9f8143ccfb9e3e2df870420e555c36b5533034.tar.bz2
spack-ce9f8143ccfb9e3e2df870420e555c36b5533034.tar.xz
spack-ce9f8143ccfb9e3e2df870420e555c36b5533034.zip
Fix view support for optional Python extensions (#35489)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/python.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py
index 666c73f739..4641f85172 100644
--- a/lib/spack/spack/build_systems/python.py
+++ b/lib/spack/spack/build_systems/python.py
@@ -113,6 +113,9 @@ class PythonExtension(spack.package_base.PackageBase):
return conflicts
def add_files_to_view(self, view, merge_map, skip_if_exists=True):
+ if not self.extendee_spec:
+ return super().add_files_to_view(view, merge_map, skip_if_exists)
+
bin_dir = self.spec.prefix.bin
python_prefix = self.extendee_spec.prefix
python_is_external = self.extendee_spec.external