Commit 8db4a034 authored by Silvio Tomatis's avatar Silvio Tomatis

Specify a version for each gem in buildout cfg.

parent 35d8ca6a
Change History Change History
************** **************
0.1.4 (UNRELEASED)
==================
- You can specify a version for each gem with a syntax similar to python eggs.
0.1.3 (2011-12-28) 0.1.3 (2011-12-28)
================== ==================
......
...@@ -162,6 +162,7 @@ class Recipe(object): ...@@ -162,6 +162,7 @@ class Recipe(object):
self._install_rubygems() self._install_rubygems()
gem_executable = self.get_gem_executable(bindir) gem_executable = self.get_gem_executable(bindir)
for gem in self.gems:
s = { s = {
'GEM': gem_executable, 'GEM': gem_executable,
'OPTIONS': ' '.join([ 'OPTIONS': ' '.join([
...@@ -169,9 +170,14 @@ class Recipe(object): ...@@ -169,9 +170,14 @@ class Recipe(object):
'--no-ri', '--no-ri',
'--bindir=%s' % bindir, '--bindir=%s' % bindir,
]), ]),
'GEMS': ' '.join(self.gems) 'GEMNAME': gem
} }
self.run('%(GEM)s install %(OPTIONS)s %(GEMS)s' % s, self._get_env()) if '=' in gem:
gemname, version = (gem.strip() for gem in gem.split('='))
s['GEMNAME'] = gemname
s['OPTIONS'] += ' --version %s' % version
print '%(GEM)s install %(OPTIONS)s %(GEMNAME)s' % s
self.run('%(GEM)s install %(OPTIONS)s %(GEMNAME)s' % s, self._get_env())
for executable in os.listdir(bindir): for executable in os.listdir(bindir):
installed_path = self._install_executable( installed_path = self._install_executable(
......
...@@ -4,7 +4,7 @@ import os ...@@ -4,7 +4,7 @@ import os
from setuptools import setup from setuptools import setup
version = '0.1.3' version = '0.1.4-dev'
name = 'rubygemsrecipe' name = 'rubygemsrecipe'
......
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