Skip to content

Commit

Permalink
making python version tunable
Browse files Browse the repository at this point in the history
  • Loading branch information
lusis committed Mar 26, 2012
1 parent 5d12d67 commit 2d31d95
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions attributes/graphite.rb
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion recipes/carbon.rb
Expand Up @@ -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]
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion recipes/web.rb
@@ -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"
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion recipes/whisper.rb
@@ -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]
Expand All @@ -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.