Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b92d5ca

Browse files
author
Joshua Timberman
committed
Merge pull request poise#30 from aweber/master
[COOK-2449] Make the distribute download location an attribute
2 parents 359f7a3 + 71ef44b commit b92d5ca

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

attributes/default.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@
3737
default['python']['version'] = '2.7.1'
3838
default['python']['checksum'] = '80e387bcf57eae8ce26726753584fd63e060ec11682d1145af921e85fd612292'
3939
default['python']['configure_options'] = %W{--prefix=#{python['prefix_dir']}}
40+
41+
default['python']['distribute_script_url'] = 'http://python-distribute.org/distribute_setup.py'
42+
default['python']['distribute_option']['download_base'] = 'https://pypi.python.org/packages/source/d/distribute/'

recipes/pip.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
# http://stackoverflow.com/questions/4324558/whats-the-proper-way-to-install-pip-virtualenv-and-distribute-for-python
3232
# https://bitbucket.org/ianb/pip/issue/104/pip-uninstall-on-ubuntu-linux
3333
remote_file "#{Chef::Config[:file_cache_path]}/distribute_setup.py" do
34-
source "http://python-distribute.org/distribute_setup.py"
34+
source node['python']['distribute_script_url']
3535
mode "0644"
3636
not_if { ::File.exists?(pip_binary) }
3737
end
3838

3939
execute "install-pip" do
4040
cwd Chef::Config[:file_cache_path]
4141
command <<-EOF
42-
#{node['python']['binary']} distribute_setup.py
42+
#{node['python']['binary']} distribute_setup.py --download-base=#{node['python']['distribute_option']['download_base']}
4343
#{::File.dirname(pip_binary)}/easy_install pip
4444
EOF
4545
not_if { ::File.exists?(pip_binary) }

0 commit comments

Comments
 (0)