summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBrice Videau <brice.videau@gmail.com>2021-10-15 11:59:32 -0500
committerGitHub <noreply@github.com>2021-10-15 16:59:32 +0000
commit0bc1bffe5044c7417ff3b3a2f01795138f6f7433 (patch)
treefc5c8d47fd88240acdad63c2c8695c19dcec4d8d /var
parent33da53e325bb04e7676531efbe58d238df8d2c85 (diff)
downloadspack-0bc1bffe5044c7417ff3b3a2f01795138f6f7433.tar.gz
spack-0bc1bffe5044c7417ff3b3a2f01795138f6f7433.tar.bz2
spack-0bc1bffe5044c7417ff3b3a2f01795138f6f7433.tar.xz
spack-0bc1bffe5044c7417ff3b3a2f01795138f6f7433.zip
Fix ruby dependent extensions. (#26729)
* Fix ruby dependent extensions. * Added Kerilk as maintainer.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index d92e8cf419..fad0096209 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -10,6 +10,8 @@ class Ruby(AutotoolsPackage):
"""A dynamic, open source programming language with a focus on
simplicity and productivity."""
+ maintainers = ['Kerilk']
+
homepage = "https://www.ruby-lang.org/"
url = "https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.0.tar.gz"
list_url = "https://cache.ruby-lang.org/pub/ruby/"
@@ -88,16 +90,18 @@ class Ruby(AutotoolsPackage):
def setup_dependent_build_environment(self, env, dependent_spec):
# TODO: do this only for actual extensions.
# Set GEM_PATH to include dependent gem directories
- ruby_paths = []
- for d in dependent_spec.traverse():
+ for d in dependent_spec.traverse(deptype=('build', 'run', 'test'), root=True):
if d.package.extends(self.spec):
- ruby_paths.append(d.prefix)
-
- env.set_path('GEM_PATH', ruby_paths)
+ env.prepend_path('GEM_PATH', d.prefix)
# The actual installation path for this gem
env.set('GEM_HOME', dependent_spec.prefix)
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ for d in dependent_spec.traverse(deptype=('run'), root=True):
+ if d.package.extends(self.spec):
+ env.prepend_path('GEM_PATH', d.prefix)
+
def setup_dependent_package(self, module, dependent_spec):
"""Called before ruby modules' install() methods. Sets GEM_HOME
and GEM_PATH to values appropriate for the package being built.