Fix view support for optional Python extensions (#35489)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
Adam J. Stewart 2023-02-20 12:58:28 -07:00 committed by Massimiliano Culpo
parent da50816127
commit c8f7c78e73

View File

@ -6,7 +6,7 @@
import os
import re
import shutil
from typing import Optional
from typing import Optional # noqa: F401
import llnl.util.filesystem as fs
import llnl.util.lang as lang
@ -108,6 +108,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(PythonExtension, self).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