summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/python/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py
index 8a6d574d9b..23b528b089 100644
--- a/var/spack/packages/python/package.py
+++ b/var/spack/packages/python/package.py
@@ -66,6 +66,11 @@ class Python(Package):
# Make the site packages directory if it does not exist already.
mkdirp(module.site_packages_dir)
+ # Add dependent packages' site-packages directory to PYTHONPATH
+ for d in ext_spec.traverse():
+ if d.package.extends(self.spec):
+ os.environ['PYTHONPATH'] += ':' + os.path.join(d.prefix, self.site_packages_dir)
+
# ========================================================================
# Handle specifics of activating and deactivating python modules.