From 9639a6996fb6d0955e99f5aa7816350b4f9d9e5d Mon Sep 17 00:00:00 2001 From: Tim Stumbaugh Date: Fri, 23 Aug 2013 16:49:45 -0400 Subject: [PATCH] Port python cookbook to Rightscale Chef - State python::default explicitly - Compile metadata --- metadata.json | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ metadata.rb | 9 +++++++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 metadata.json diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..d848e7f --- /dev/null +++ b/metadata.json @@ -0,0 +1,59 @@ +{ + "name": "python", + "description": "Installs Python, pip and virtualenv. Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.", + "long_description": "", + "maintainer": "Opscode, Inc.", + "maintainer_email": "cookbooks@opscode.com", + "license": "Apache 2.0", + "platforms": { + "debian": ">= 0.0.0", + "ubuntu": ">= 0.0.0", + "centos": ">= 0.0.0", + "redhat": ">= 0.0.0", + "fedora": ">= 0.0.0", + "freebsd": ">= 0.0.0", + "smartos": ">= 0.0.0" + }, + "dependencies": { + "build-essential": ">= 0.0.0", + "yum": ">= 0.0.0" + }, + "recommendations": { + }, + "suggestions": { + }, + "conflicting": { + }, + "providing": { + }, + "replacing": { + }, + "attributes": { + "python/version": { + "display_name": "Python version to install", + "description": "The version of Python to install. Make sure this is correct", + "required": "recommended", + "default": "2.7.3", + "recipes": [ + "python::default", + "python::package", + "python::source" + ], + "choice": [ + + ], + "calculated": false, + "type": "string" + } + }, + "groupings": { + }, + "recipes": { + "python::default": "Installs python, pip, and virtualenv", + "python::package": "Installs python using packages.", + "python::source": "Installs python from source.", + "python::pip": "Installs pip from source.", + "python::virtualenv": "Installs virtualenv using the python_pip resource." + }, + "version": "1.3.7" +} \ No newline at end of file diff --git a/metadata.rb b/metadata.rb index 8398f8a..93fc8c4 100644 --- a/metadata.rb +++ b/metadata.rb @@ -8,7 +8,7 @@ depends "build-essential" depends "yum" -recipe "python", "Installs python, pip, and virtualenv" +recipe "python::default", "Installs python, pip, and virtualenv" recipe "python::package", "Installs python using packages." recipe "python::source", "Installs python from source." recipe "python::pip", "Installs pip from source." @@ -17,3 +17,10 @@ %w{ debian ubuntu centos redhat fedora freebsd smartos }.each do |os| supports os end + +attribute "python/version", + :display_name => "Python version to install", + :description => "The version of Python to install. Make sure this is correct", + :required => "recommended", + :default => "2.7.3", + :recipes => ["python::default", "python::package", "python::source"]