[vagrant] Added custom-built django-piston python package
This commit is contained in:
parent
ecaa39ab59
commit
c6de28af71
Binary file not shown.
|
@ -8,7 +8,7 @@ recipe "server", "Include Nailgun daemon install/configuration"
|
|||
|
||||
supports "ubuntu" # It should work on debian too, but not tested yet
|
||||
|
||||
%w{celery redis django}.each do |cookbook|
|
||||
%w{celery redis django python}.each do |cookbook|
|
||||
depends cookbook
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
p run_context.definitions
|
||||
cookbook_python_pip 'django-piston' do
|
||||
version '0.2.3-20120528'
|
||||
end
|
||||
|
||||
{ 'django-piston' => '0.2.3',
|
||||
{
|
||||
'django-celery' => '2.5.5',
|
||||
'redis' => '2.4.12',
|
||||
'jsonfield' => '0.9',
|
||||
|
@ -8,7 +12,6 @@
|
|||
}.each do |package, version|
|
||||
python_pip package do
|
||||
version version
|
||||
action :install
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
# Install python package right from cookbook.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# cookbook_python_pip 'foo' do
|
||||
# version '0.1.1'
|
||||
# end
|
||||
#
|
||||
# The package file should be inside files/ tree and have name:
|
||||
# <name>-<version>.tar.gz
|
||||
# or
|
||||
# <name>.tar.gz
|
||||
# if you do not specify version
|
||||
#
|
||||
# E.g.
|
||||
# foo-0.1.1.tar.gz
|
||||
#
|
||||
define :cookbook_python_pip, :version => nil do
|
||||
package_file = params[:name]
|
||||
package_file += "-#{params[:version]}" if params[:version]
|
||||
package_file += '.tar.gz'
|
||||
|
||||
cookbook_file "/tmp/#{package_file}" do
|
||||
source params[:source] if params[:source]
|
||||
cookbook params[:cookbook] if params[:cookbook]
|
||||
end
|
||||
|
||||
python_pip params[:name] do
|
||||
package_name "file:///tmp/#{package_file}"
|
||||
version 'latest'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue