summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-23 00:36:32 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-23 00:36:32 -0700
commitc4134ee71e43a6a2a38822e25cc72ca73efdcfea (patch)
tree80432ea6684b5a3ab35d9d89b548e5c564780a2d /var
parent2d69f386d03fb1c13488c08583177c322b3e7b8c (diff)
downloadspack-c4134ee71e43a6a2a38822e25cc72ca73efdcfea.tar.gz
spack-c4134ee71e43a6a2a38822e25cc72ca73efdcfea.tar.bz2
spack-c4134ee71e43a6a2a38822e25cc72ca73efdcfea.tar.xz
spack-c4134ee71e43a6a2a38822e25cc72ca73efdcfea.zip
Fix #608: broken numpy build.
- Failed to catch all instances of modify_module when it was renamed to setup_dependent_package. - Refactored remaining modify_module calls. - Also modified Python's setup_dependent_package slightly: only creates empty site-packages directory for Python extensions now, not for all dependents.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python/package.py11
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py6
2 files changed, 9 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 4f55bc803e..6d9030805b 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -108,7 +108,7 @@ class Python(Package):
run_env.set('PYTHONPATH', pythonpath)
- def modify_module(self, module, spec, ext_spec):
+ def setup_dependent_package(self, module, ext_spec):
"""
Called before python modules' install() methods.
@@ -118,17 +118,18 @@ class Python(Package):
"""
# Python extension builds can have a global python executable function
if self.version >= Version("3.0.0") and self.version < Version("4.0.0"):
- module.python = Executable(join_path(spec.prefix.bin, 'python3'))
+ module.python = Executable(join_path(self.spec.prefix.bin, 'python3'))
else:
- module.python = Executable(join_path(spec.prefix.bin, 'python'))
+ module.python = Executable(join_path(self.spec.prefix.bin, 'python'))
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir)
module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
- # Make the site packages directory if it does not exist already.
- mkdirp(module.site_packages_dir)
+ # Make the site packages directory for extensions, if it does not exist already.
+ if ext_spec.package.is_extension:
+ mkdirp(module.site_packages_dir)
# ========================================================================
# Handle specifics of activating and deactivating python modules.
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index 7ff1898ce9..e13677e4d2 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -30,7 +30,7 @@ class Ruby(Package):
# The actual installation path for this gem
spack_env.set('GEM_HOME', extension_spec.prefix)
- def modify_module(self, module, spec, ext_spec):
+ def setup_dependent_package(self, module, ext_spec):
"""Called before ruby modules' install() methods. Sets GEM_HOME
and GEM_PATH to values appropriate for the package being built.
@@ -39,5 +39,5 @@ class Ruby(Package):
gem('install', '<gem-name>.gem')
"""
# Ruby extension builds have global ruby and gem functions
- module.ruby = Executable(join_path(spec.prefix.bin, 'ruby'))
- module.gem = Executable(join_path(spec.prefix.bin, 'gem'))
+ module.ruby = Executable(join_path(self.spec.prefix.bin, 'ruby'))
+ module.gem = Executable(join_path(self.spec.prefix.bin, 'gem'))