Permalink
Browse files

making python version tunable

  • Loading branch information...
1 parent 5d12d67 commit 2d31d9513dfad74fe6edfc51044e0e0ead985621 @lusis lusis committed Mar 26, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −0 attributes/graphite.rb
  2. +2 −1 recipes/carbon.rb
  3. +2 −1 recipes/web.rb
  4. +2 −1 recipes/whisper.rb
View
@@ -1,4 +1,5 @@
default[:graphite][:version] = "0.9.9"
+default[:graphite][:python_version] = "2.6"
default[:graphite][:carbon][:uri] = "http://launchpadlibrarian.net/82112362/carbon-#{node[:graphite][:version]}.tar.gz"
default[:graphite][:carbon][:checksum] = "b3d42e3b93c09"
View
@@ -2,6 +2,7 @@
package "python-simplejson"
version = node[:graphite][:version]
+pyver = node[:graphite][:python_version]
remote_file "/usr/src/carbon-#{version}.tar.gz" do
source node[:graphite][:carbon][:uri]
@@ -16,7 +17,7 @@
execute "install carbon" do
command "python setup.py install"
- creates "/opt/graphite/lib/carbon-#{version}-py2.6.egg-info"
+ creates "/opt/graphite/lib/carbon-#{version}-py#{pyver}.egg-info"
cwd "/usr/src/carbon-#{version}"
end
View
@@ -1,6 +1,7 @@
include_recipe "apache2::mod_python"
version = node[:graphite][:version]
+pyver = node[:graphite][:python_version]
package "python-cairo-dev"
package "python-django"
@@ -21,7 +22,7 @@
execute "install graphite-web" do
command "python setup.py install"
- creates "/opt/graphite/webapp/graphite_web-#{version}-py2.6.egg-info"
+ creates "/opt/graphite/webapp/graphite_web-#{version}-py#{pyver}.egg-info"
cwd "/usr/src/graphite-web-#{version}"
end
View
@@ -1,4 +1,5 @@
version = node[:graphite][:version]
+pyver = node[:graphite][:python_version]
remote_file "/usr/src/whisper-#{version}.tar.gz" do
source node[:graphite][:whisper][:uri]
@@ -13,6 +14,6 @@
execute "install whisper" do
command "python setup.py install"
- creates "/usr/local/lib/python2.6/dist-packages/whisper-#{version}.egg-info"
+ creates "/usr/local/lib/python#{pyver}/dist-packages/whisper-#{version}.egg-info"
cwd "/usr/src/whisper-#{version}"
end

0 comments on commit 2d31d95

Please sign in to comment.