summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-09-02 18:26:36 -0500
committerGitHub <noreply@github.com>2020-09-02 16:26:36 -0700
commit443407cda545e31d33c9d5abac393c8ac8ad33a2 (patch)
treedcf18cd702804fba6d5ace31fb5cf5b201bb7411 /var
parente22a0ca5cf6ea62cb28af8e8db59a55ad3f75c36 (diff)
downloadspack-443407cda545e31d33c9d5abac393c8ac8ad33a2.tar.gz
spack-443407cda545e31d33c9d5abac393c8ac8ad33a2.tar.bz2
spack-443407cda545e31d33c9d5abac393c8ac8ad33a2.tar.xz
spack-443407cda545e31d33c9d5abac393c8ac8ad33a2.zip
Add new RubyPackage build system base class (#18199)
* Add new RubyPackage build system base class * Ruby: add spack external find support * Add build tests for RubyPackage
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/asciidoctor/package.py20
-rw-r--r--var/spack/repos/builtin/packages/ruby-asciidoctor/package.py16
-rw-r--r--var/spack/repos/builtin/packages/ruby-erubis/package.py19
-rw-r--r--var/spack/repos/builtin/packages/ruby-gnuplot/package.py14
-rw-r--r--var/spack/repos/builtin/packages/ruby-hpricot/package.py16
-rw-r--r--var/spack/repos/builtin/packages/ruby-mustache/package.py16
-rw-r--r--var/spack/repos/builtin/packages/ruby-narray/package.py16
-rw-r--r--var/spack/repos/builtin/packages/ruby-rake/package.py15
-rw-r--r--var/spack/repos/builtin/packages/ruby-rdiscount/package.py15
-rw-r--r--var/spack/repos/builtin/packages/ruby-ronn/package.py14
-rw-r--r--var/spack/repos/builtin/packages/ruby-rubyinline/package.py16
-rw-r--r--var/spack/repos/builtin/packages/ruby-svn2git/package.py10
-rw-r--r--var/spack/repos/builtin/packages/ruby-terminal-table/package.py15
-rw-r--r--var/spack/repos/builtin/packages/ruby-thor/package.py15
-rw-r--r--var/spack/repos/builtin/packages/ruby-tmuxinator/package.py18
-rw-r--r--var/spack/repos/builtin/packages/ruby-unicode-display-width/package.py15
-rw-r--r--var/spack/repos/builtin/packages/ruby-xdg/package.py18
-rw-r--r--var/spack/repos/builtin/packages/ruby-zentest/package.py19
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py15
-rw-r--r--var/spack/repos/builtin/packages/tmuxinator/package.py21
20 files changed, 222 insertions, 101 deletions
diff --git a/var/spack/repos/builtin/packages/asciidoctor/package.py b/var/spack/repos/builtin/packages/asciidoctor/package.py
deleted file mode 100644
index c3cff43468..0000000000
--- a/var/spack/repos/builtin/packages/asciidoctor/package.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
-# Spack Project Developers. See the top-level COPYRIGHT file for details.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-from spack import *
-
-
-class Asciidoctor(Package):
- """Modern asciidoc tool based on ruby"""
-
- homepage = "https://asciidoctor.org/"
- url = "https://rubygems.org/downloads/asciidoctor-1.5.8.gem"
-
- version('1.5.8', sha256='9deaa93eacadda48671e18395b992eafba35d08f25ddbe28d25bb275831a8d62', expand=False)
-
- extends('ruby')
-
- def install(self, spec, prefix):
- gem('install', 'asciidoctor-{0}.gem'.format(self.version))
diff --git a/var/spack/repos/builtin/packages/ruby-asciidoctor/package.py b/var/spack/repos/builtin/packages/ruby-asciidoctor/package.py
new file mode 100644
index 0000000000..e83abed536
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-asciidoctor/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyAsciidoctor(RubyPackage):
+ """A fast, open source text processor and publishing toolchain for
+ converting AsciiDoc content to HTML 5, DocBook 5, and other formats."""
+
+ homepage = "https://asciidoctor.org/"
+ url = "https://github.com/asciidoctor/asciidoctor/archive/v2.0.10.tar.gz"
+
+ version('2.0.10', sha256='afca74837e6d4b339535e8ba0b79f2ad00bd1eef78bf391cc36995ca2e31630a')
+
+ depends_on('ruby@2.3.0:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-erubis/package.py b/var/spack/repos/builtin/packages/ruby-erubis/package.py
new file mode 100644
index 0000000000..764f2f342c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-erubis/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyErubis(RubyPackage):
+ """Erubis is a fast, secure, and very extensible implementation of eRuby.
+ """
+
+ homepage = "http://www.kuwata-lab.com/erubis/"
+ git = "https://github.com/kwatch/erubis.git"
+
+ version('master', branch='master')
+ version('2.7.0', commit='14d3eab57fbc361312c8f3af350cbf9a5bafce17')
+
+ def patch(self):
+ filter_file('$Release$', str(self.version),
+ 'erubis.gemspec', string=True)
diff --git a/var/spack/repos/builtin/packages/ruby-gnuplot/package.py b/var/spack/repos/builtin/packages/ruby-gnuplot/package.py
index 20bef687bc..56509c40ea 100644
--- a/var/spack/repos/builtin/packages/ruby-gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/ruby-gnuplot/package.py
@@ -3,20 +3,16 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
-
-class RubyGnuplot(Package):
+class RubyGnuplot(RubyPackage):
"""Utility library to aid in interacting with gnuplot from ruby"""
- homepage = "https://rubygems.org/gems/gnuplot/versions/2.6.2"
+ homepage = "https://github.com/rdp/ruby_gnuplot"
url = "https://rubygems.org/downloads/gnuplot-2.6.2.gem"
+ # Source code is available at https://github.com/rdp/ruby_gnuplot
+ # but release tarballs are not available, download gem instead
+
version('2.6.2', sha256='d2c28d4a55867ef6f0a5725ce157581917b4d27417bc3767c7c643a828416bb3', expand=False)
depends_on('gnuplot+X')
-
- extends('ruby')
-
- def install(self, spec, prefix):
- gem('install', 'gnuplot-{0}.gem'.format(self.version))
diff --git a/var/spack/repos/builtin/packages/ruby-hpricot/package.py b/var/spack/repos/builtin/packages/ruby-hpricot/package.py
new file mode 100644
index 0000000000..92edad8281
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-hpricot/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyHpricot(RubyPackage):
+ """A swift, liberal HTML parser with a fantastic library.
+
+ NOTE: ruby-hpricot is no longer maintained, consider ruby-nokogiri instead.
+ """
+
+ homepage = "https://github.com/hpricot/hpricot"
+ url = "https://github.com/hpricot/hpricot/archive/0.8.6.tar.gz"
+
+ version('0.8.6', sha256='792f63cebe2f2b02058974755b4c8a3aef52e5daf37f779a34885d5ff2876017')
diff --git a/var/spack/repos/builtin/packages/ruby-mustache/package.py b/var/spack/repos/builtin/packages/ruby-mustache/package.py
new file mode 100644
index 0000000000..494bd4c8fc
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-mustache/package.py
@@ -0,0 +1,16 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyMustache(RubyPackage):
+ """Inspired by ctemplate and et, Mustache is a framework-agnostic way to
+ render logic-free views."""
+
+ homepage = "https://github.com/mustache/mustache"
+ url = "https://github.com/mustache/mustache/archive/v1.1.1.tar.gz"
+
+ version('1.1.1', sha256='9ab4a9842a37d5278789ba26152b0b78f649e3020266809ec33610a89f7e65ea')
+
+ depends_on('ruby@2.0:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-narray/package.py b/var/spack/repos/builtin/packages/ruby-narray/package.py
index 7c05259f1b..c35fcfc5be 100644
--- a/var/spack/repos/builtin/packages/ruby-narray/package.py
+++ b/var/spack/repos/builtin/packages/ruby-narray/package.py
@@ -3,21 +3,15 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
-
-class RubyNarray(Package):
+class RubyNarray(RubyPackage):
"""Numo::NArray is an Numerical N-dimensional Array class for fast
processing and easy manipulation of multi-dimensional numerical data,
similar to numpy.ndaray."""
- homepage = "https://rubygems.org/gems/narray"
- git = "https://github.com/ruby-numo/narray.git"
-
- version('0.9.0.9', commit='9cadbbccf1e01b6d1bc143c19d598cad1c420869')
+ homepage = "https://masa16.github.io/narray/"
+ url = "https://github.com/ruby-numo/numo-narray/archive/v0.9.1.8.tar.gz"
- extends('ruby')
+ version('0.9.1.8', sha256='48814c6ebf2c4846fcf6cfd2705a15a97a608960c1676cb6c7b5c9254b0dd51b')
- def install(self, spec, prefix):
- gem('build', 'numo-narray.gemspec')
- gem('install', 'numo-narray-{0}.gem'.format(self.version))
+ depends_on('ruby@2.2:2.999', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-rake/package.py b/var/spack/repos/builtin/packages/ruby-rake/package.py
new file mode 100644
index 0000000000..b9b59c0b22
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-rake/package.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyRake(RubyPackage):
+ """Rake is a Make-like program implemented in Ruby."""
+
+ homepage = "https://github.com/ruby/rake"
+ url = "https://github.com/ruby/rake/archive/v13.0.1.tar.gz"
+
+ version('13.0.1', sha256='d865329b5e0c38bd9d11ce70bd1ad6e0d5676c4eee74fd818671c55ec49d92fd')
+
+ depends_on('ruby@2.2:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-rdiscount/package.py b/var/spack/repos/builtin/packages/ruby-rdiscount/package.py
new file mode 100644
index 0000000000..40a3ae1499
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-rdiscount/package.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyRdiscount(RubyPackage):
+ """Fast Implementation of Gruber's Markdown in C."""
+
+ homepage = "https://dafoster.net/projects/rdiscount/"
+ url = "https://github.com/davidfstr/rdiscount/archive/2.2.0.2.tar.gz"
+
+ version('2.2.0.2', sha256='a6956059fc61365c242373b03c5012582d7342842eae38fe59ebc1bc169744db')
+
+ depends_on('ruby@1.9.3:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-ronn/package.py b/var/spack/repos/builtin/packages/ruby-ronn/package.py
index de2a8e6da4..5571ff6d64 100644
--- a/var/spack/repos/builtin/packages/ruby-ronn/package.py
+++ b/var/spack/repos/builtin/packages/ruby-ronn/package.py
@@ -3,21 +3,17 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
-
-class RubyRonn(Package):
+class RubyRonn(RubyPackage):
"""Ronn builds manuals. It converts simple, human readable textfiles to
roff for terminal display, and also to HTML for the web."""
- homepage = "https://rubygems.org/gems/ronn"
+ homepage = "https://rtomayko.github.io/ronn/"
url = "https://github.com/rtomayko/ronn/archive/0.7.3.tar.gz"
version('0.7.3', sha256='808aa6668f636ce03abba99c53c2005cef559a5099f6b40bf2c7aad8e273acb4')
version('0.7.0', sha256='ea14337093de8707aa8a67b97357332fa8a03b0df722bdbf4f027fbe4379b185')
- extends('ruby')
-
- def install(self, spec, prefix):
- gem('build', 'ronn.gemspec')
- gem('install', 'ronn-{0}.gem'.format(self.version))
+ depends_on('ruby-hpricot@0.8.2:', type=('build', 'run'))
+ depends_on('ruby-rdiscount@1.5.8:', type=('build', 'run'))
+ depends_on('ruby-mustache@0.7.0:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-rubyinline/package.py b/var/spack/repos/builtin/packages/ruby-rubyinline/package.py
index 39f53e8c2e..cb26205355 100644
--- a/var/spack/repos/builtin/packages/ruby-rubyinline/package.py
+++ b/var/spack/repos/builtin/packages/ruby-rubyinline/package.py
@@ -3,18 +3,16 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
-
-class RubyRubyinline(Package):
+class RubyRubyinline(RubyPackage):
"""Inline allows you to write foreign code within your ruby code."""
- homepage = "https://rubygems.org/gems/RubyInline"
- url = "https://rubygems.org/downloads/RubyInline-3.12.4.gem"
+ homepage = "https://www.zenspider.com/projects/rubyinline.html"
+ url = "https://rubygems.org/downloads/RubyInline-3.12.5.gem"
- version('3.12.4', sha256='205bbc14c02d3d55e1b497241ede832ab87f3d981f92f3bda98b75e8144103e0', expand=False)
+ # Source code available at https://github.com/seattlerb/rubyinline
+ # but I had trouble getting the Rakefile to build
- extends('ruby')
+ version('3.12.5', sha256='d4559cb86b7fedd2e9b4b0a3bd99a1955186dbc09f1269920a0dd5c67639c156', expand=False)
- def install(self, spec, prefix):
- gem('install', 'RubyInline-{0}.gem'.format(self.version))
+ depends_on('ruby-zentest@4.3:4.999', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-svn2git/package.py b/var/spack/repos/builtin/packages/ruby-svn2git/package.py
index a183267c8f..5715a9d922 100644
--- a/var/spack/repos/builtin/packages/ruby-svn2git/package.py
+++ b/var/spack/repos/builtin/packages/ruby-svn2git/package.py
@@ -3,10 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
-
-class RubySvn2git(Package):
+class RubySvn2git(RubyPackage):
"""svn2git is a tiny utility for migrating projects from Subversion to Git
while keeping the trunk, branches and tags where they should be. It uses
git-svn to clone an svn repository and does some clean-up to make sure
@@ -21,9 +19,3 @@ class RubySvn2git(Package):
depends_on('git')
depends_on('subversion+perl')
-
- extends('ruby')
-
- def install(self, spec, prefix):
- gem('build', 'svn2git.gemspec')
- gem('install', 'svn2git-{0}.gem'.format(self.version))
diff --git a/var/spack/repos/builtin/packages/ruby-terminal-table/package.py b/var/spack/repos/builtin/packages/ruby-terminal-table/package.py
index ba6790b3d4..b2384ab225 100644
--- a/var/spack/repos/builtin/packages/ruby-terminal-table/package.py
+++ b/var/spack/repos/builtin/packages/ruby-terminal-table/package.py
@@ -3,18 +3,13 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
-
-class RubyTerminalTable(Package):
+class RubyTerminalTable(RubyPackage):
"""Simple, feature rich ascii table generation library"""
- homepage = "https://rubygems.org/gems/terminal-table"
- url = "https://rubygems.org/downloads/terminal-table-1.8.0.gem"
-
- version('1.8.0', sha256='13371f069af18e9baa4e44d404a4ada9301899ce0530c237ac1a96c19f652294', expand=False)
+ homepage = "https://github.com/tj/terminal-table"
+ url = "https://github.com/tj/terminal-table/archive/v1.8.0.tar.gz"
- extends('ruby')
+ version('1.8.0', sha256='69b8e157f5dc3f056b5242923ab3e729a16c6f893b3a5d540e71135a973e5fbe')
- def install(self, spec, prefix):
- gem('install', 'terminal-table-{0}.gem'.format(self.version))
+ depends_on('ruby-unicode-display-width@1.1.1:1.999', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-thor/package.py b/var/spack/repos/builtin/packages/ruby-thor/package.py
new file mode 100644
index 0000000000..e514ea5066
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-thor/package.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyThor(RubyPackage):
+ """Thor is a toolkit for building powerful command-line interfaces."""
+
+ homepage = "http://whatisthor.com/"
+ url = "https://github.com/erikhuda/thor/archive/v1.0.1.tar.gz"
+
+ version('1.0.1', sha256='e6b902764e237ce296cf9e339c93f8ca83bec5b59be0bf8bacd7ffddc6684d07')
+
+ depends_on('ruby@2.0.0:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-tmuxinator/package.py b/var/spack/repos/builtin/packages/ruby-tmuxinator/package.py
new file mode 100644
index 0000000000..31e1fa8580
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-tmuxinator/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyTmuxinator(RubyPackage):
+ """Create and manage complex tmux sessions easily."""
+
+ homepage = "https://github.com/tmuxinator/tmuxinator"
+ url = "https://github.com/tmuxinator/tmuxinator/archive/v2.0.1.tar.gz"
+
+ version('2.0.1', sha256='a2c8428d239a6e869da516cecee3ac64db47ba1f1932317eb397b1afd698ee09')
+
+ depends_on('ruby@2.5.8:', type=('build', 'run'))
+ depends_on('ruby-erubis@2.6:2.999', type=('build', 'run'))
+ depends_on('ruby-thor@1.0:1.999', type=('build', 'run'))
+ depends_on('ruby-xdg@2.2.5:2.999', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-unicode-display-width/package.py b/var/spack/repos/builtin/packages/ruby-unicode-display-width/package.py
new file mode 100644
index 0000000000..6f4073e097
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-unicode-display-width/package.py
@@ -0,0 +1,15 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyUnicodeDisplayWidth(RubyPackage):
+ """Determines the monospace display width of a string in Ruby."""
+
+ homepage = "https://github.com/janlelis/unicode-display_width"
+ url = "https://github.com/janlelis/unicode-display_width/archive/v1.7.0.tar.gz"
+
+ version('1.7.0', sha256='2dd6faa95e022a9f52841d29be6c622c58fff9fb0b84fb2cb30d4f0e13fa8a73')
+
+ depends_on('ruby@1.9.3:', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby-xdg/package.py b/var/spack/repos/builtin/packages/ruby-xdg/package.py
new file mode 100644
index 0000000000..6c86522cc9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-xdg/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyXdg(RubyPackage):
+ """Provides a Ruby implementation of the XDG Base Directory Specification.
+ """
+
+ homepage = "https://www.alchemists.io/projects/xdg/"
+ url = "https://rubygems.org/downloads/xdg-2.2.5.gem"
+
+ # Source code can be found at https://github.com/bkuhlmann/xdg and
+ # https://github.com/rubyworks/xdg but I was unable to get it to build
+ # from source
+
+ version('2.2.5', sha256='f3a5f799363852695e457bb7379ac6c4e3e8cb3a51ce6b449ab47fbb1523b913', expand=False)
diff --git a/var/spack/repos/builtin/packages/ruby-zentest/package.py b/var/spack/repos/builtin/packages/ruby-zentest/package.py
new file mode 100644
index 0000000000..64960072b3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ruby-zentest/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+class RubyZentest(RubyPackage):
+ """ZenTest provides 4 different tools: zentest, unit_diff, autotest, and
+ multiruby."""
+
+ homepage = "https://github.com/seattlerb/zentest"
+ url = "https://rubygems.org/downloads/ZenTest-4.12.0.gem"
+
+ # Source code available at https://github.com/seattlerb/zentest
+ # but I had trouble getting the Rakefile to build
+
+ version('4.12.0', sha256='5301757c3ab29dd2222795c1b076dd348f4d92fe0426e97a13ae56fea47a786e', expand=False)
+
+ depends_on('ruby@1.8:2.999', type=('build', 'run'))
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index ade1e2f39f..132e1c83fb 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
+import re
class Ruby(AutotoolsPackage):
@@ -54,6 +54,14 @@ class Ruby(AutotoolsPackage):
expand=False
)
+ executables = ['^ruby$']
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)('--version', output=str, error=str)
+ match = re.search(r'ruby ([\d.]+)', output)
+ return match.group(1) if match else None
+
def url_for_version(self, version):
url = "http://cache.ruby-lang.org/pub/ruby/{0}/ruby-{1}.tar.gz"
return url.format(version.up_to(2), version)
@@ -92,8 +100,9 @@ class Ruby(AutotoolsPackage):
gem('install', '<gem-name>.gem')
"""
# Ruby extension builds have global ruby and gem functions
- module.ruby = Executable(join_path(self.spec.prefix.bin, 'ruby'))
- module.gem = Executable(join_path(self.spec.prefix.bin, 'gem'))
+ module.ruby = Executable(self.prefix.bin.ruby)
+ module.gem = Executable(self.prefix.bin.gem)
+ module.rake = Executable(self.prefix.bin.rake)
@run_after('install')
def post_install(self):
diff --git a/var/spack/repos/builtin/packages/tmuxinator/package.py b/var/spack/repos/builtin/packages/tmuxinator/package.py
deleted file mode 100644
index 1f82efd976..0000000000
--- a/var/spack/repos/builtin/packages/tmuxinator/package.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
-# Spack Project Developers. See the top-level COPYRIGHT file for details.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-from spack import *
-
-
-class Tmuxinator(Package):
- """A session configuration creator and manager for tmux"""
-
- homepage = "https://github.com/tmuxinator/tmuxinator"
- git = "https://github.com/tmuxinator/tmuxinator.git"
-
- version('0.6.11', tag='v0.6.11')
-
- extends('ruby')
-
- def install(self, spec, prefix):
- gem('build', 'tmuxinator.gemspec')
- gem('install', 'tmuxinator-{0}.gem'.format(self.version))