Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked frompoise/python

Commit488d653

Browse files
committed
Merge pull requestpoise#48 from ka2n/setuptools_0_8_x
Use setuptools instead of distribute
2 parentsa96af3b +2a3677e commit488d653

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

‎attributes/default.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
default['python']['checksum']='3b477554864e616a041ee4d7cef9849751770bc7c39adaf78a94ea145c488059'
3939
default['python']['configure_options']=%W{--prefix=#{python['prefix_dir']}}
4040

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/'
41+
default['python']['setuptools_script_url']='https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py'
42+
default['python']['pip_script_url']='https://raw.github.com/pypa/pip/master/contrib/get-pip.py'

‎recipes/pip.rb

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,30 @@
3333
pip_binary="/usr/local/bin/pip"
3434
end
3535

36-
# Ubuntu's python-setuptools, python-pip and python-virtualenv packages
37-
# are broken...this feels like Rubygems!
38-
# http://stackoverflow.com/questions/4324558/whats-the-proper-way-to-install-pip-virtualenv-and-distribute-for-python
39-
# https://bitbucket.org/ianb/pip/issue/104/pip-uninstall-on-ubuntu-linux
40-
remote_file"#{Chef::Config[:file_cache_path]}/distribute_setup.py"do
41-
sourcenode['python']['distribute_script_url']
36+
remote_file"#{Chef::Config[:file_cache_path]}/ez_setup.py"do
37+
sourcenode['python']['setuptools_script_url']
38+
mode"0644"
39+
not_if"#{node['python']['binary']} -c 'import setuptools'"
40+
end
41+
42+
remote_file"#{Chef::Config[:file_cache_path]}/get-pip.py"do
43+
sourcenode['python']['pip_script_url']
4244
mode"0644"
4345
not_if{ ::File.exists?(pip_binary)}
4446
end
4547

48+
execute"install-setuptools"do
49+
cwdChef::Config[:file_cache_path]
50+
command<<-EOF
51+
#{node['python']['binary']} ez_setup.py
52+
EOF
53+
not_if"#{node['python']['binary']} -c 'import setuptools'"
54+
end
55+
4656
execute"install-pip"do
4757
cwdChef::Config[:file_cache_path]
4858
command<<-EOF
49-
#{node['python']['binary']} distribute_setup.py --download-base=#{node['python']['distribute_option']['download_base']}
50-
#{::File.dirname(pip_binary)}/easy_install pip
59+
#{node['python']['binary']} get-pip.py
5160
EOF
5261
not_if{ ::File.exists?(pip_binary)}
5362
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp