Allow to specify arbitrary ruby executable

parent 2b536d29
...@@ -29,7 +29,8 @@ class Recipe(object): ...@@ -29,7 +29,8 @@ class Recipe(object):
self.gems = options['gems'].split() self.gems = options['gems'].split()
self.version = options.get('version') self.version = options.get('version')
# Allow to define specific ruby executable. If not, take just 'ruby'
self.ruby_executable = options.get('ruby', 'ruby')
def run(self, cmd, environ=None): def run(self, cmd, environ=None):
"""Run the given ``cmd`` in a child process.""" """Run the given ``cmd`` in a child process."""
...@@ -125,8 +126,9 @@ class Recipe(object): ...@@ -125,8 +126,9 @@ class Recipe(object):
'--no-rdoc', '--no-rdoc',
'--no-ri', '--no-ri',
]), ]),
'RUBY': self.ruby,
} }
self.run('ruby setup.rb all %(OPTIONS)s' % s, env) self.run('%(RUBY)s setup.rb all %(OPTIONS)s' % s, env)
finally: finally:
shutil.rmtree(srcdir) shutil.rmtree(srcdir)
os.chdir(current_dir) os.chdir(current_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment