From e51e01f4f066f9b0f412354cb8abab3642845d43 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 8 Feb 2015 19:39:36 -0800 Subject: Cleaned up python to remove redundant line. --- var/spack/packages/python/package.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'var') 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) # ======================================================================== -- cgit v1.2.3-70-g09d2