diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-08 19:39:36 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-08 19:39:36 -0800 |
commit | e51e01f4f066f9b0f412354cb8abab3642845d43 (patch) | |
tree | 7418fc0e5e1247df3b1f69014d4374c9cf142bf1 /var | |
parent | befe72b9b9d1f4107eef8f24e6f194f27a15bca4 (diff) | |
download | spack-e51e01f4f066f9b0f412354cb8abab3642845d43.tar.gz spack-e51e01f4f066f9b0f412354cb8abab3642845d43.tar.bz2 spack-e51e01f4f066f9b0f412354cb8abab3642845d43.tar.xz spack-e51e01f4f066f9b0f412354cb8abab3642845d43.zip |
Cleaned up python to remove redundant line.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/packages/python/package.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py index 23b528b089..8bffbf393c 100644 --- a/var/spack/packages/python/package.py +++ b/var/spack/packages/python/package.py @@ -60,16 +60,16 @@ class Python(Package): module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir) - # Add site packages directory to the PYTHONPATH - os.environ['PYTHONPATH'] = module.site_packages_dir - # Make the site packages directory if it does not exist already. mkdirp(module.site_packages_dir) - # Add dependent packages' site-packages directory to PYTHONPATH + # Set PYTHONPATH to include site-packages dir for the + # extension and any other python extensions it depends on. + python_paths = [] for d in ext_spec.traverse(): if d.package.extends(self.spec): - os.environ['PYTHONPATH'] += ':' + os.path.join(d.prefix, self.site_packages_dir) + python_paths.append(os.path.join(d.prefix, self.site_packages_dir)) + os.environ['PYTHONPATH'] = ':'.join(python_paths) # ======================================================================== |