From ce9f8143ccfb9e3e2df870420e555c36b5533034 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 20 Feb 2023 12:58:28 -0700 Subject: [PATCH] Fix view support for optional Python extensions (#35489) Co-authored-by: Harmen Stoppels --- lib/spack/spack/build_systems/python.py | 3 +++ 1 file changed, 3 insertions(+) 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 @@ def view_file_conflicts(self, view, merge_map): 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