summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGregory L. Lee <lee218@llnl.gov>2015-02-06 16:35:35 -0800
committerGregory L. Lee <lee218@llnl.gov>2015-02-06 16:35:35 -0800
commit5cc369c2b831446f1afaaba41cbf0dbdba75b4ed (patch)
tree142f9038450e758bc860e3c3cb59ce2f6524b60a /var
parent3a3e4d4391977327bca18c416205971dd6a85509 (diff)
downloadspack-5cc369c2b831446f1afaaba41cbf0dbdba75b4ed.tar.gz
spack-5cc369c2b831446f1afaaba41cbf0dbdba75b4ed.tar.bz2
spack-5cc369c2b831446f1afaaba41cbf0dbdba75b4ed.tar.xz
spack-5cc369c2b831446f1afaaba41cbf0dbdba75b4ed.zip
add dependent packages to PYTHONPATH for build
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.