summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/build_systems/python.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py
index 2aad627f2d..5116a8aac6 100644
--- a/lib/spack/spack/build_systems/python.py
+++ b/lib/spack/spack/build_systems/python.py
@@ -418,6 +418,7 @@ class PythonPackage(PackageBase):
def add_files_to_view(self, view, merge_map):
bin_dir = self.spec.prefix.bin
python_prefix = self.extendee_spec.prefix
+ python_is_external = self.extendee_spec.external
global_view = same_path(python_prefix, view.get_projection_for_spec(
self.spec
))
@@ -428,7 +429,8 @@ class PythonPackage(PackageBase):
view.link(src, dst)
elif not os.path.islink(src):
shutil.copy2(src, dst)
- if 'script' in get_filetype(src):
+ is_script = 'script' in get_filetype(src)
+ if is_script and not python_is_external:
filter_file(
python_prefix, os.path.abspath(
view.get_projection_for_spec(self.spec)), dst