File tree 2 files changed +19
-10
lines changed
2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 38
38
default [ 'python' ] [ 'checksum' ] = '3b477554864e616a041ee4d7cef9849751770bc7c39adaf78a94ea145c488059'
39
39
default [ 'python' ] [ 'configure_options' ] = %W{ --prefix=#{ python [ 'prefix_dir' ] } }
40
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/ '
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 '
Original file line number Diff line number Diff line change 33
33
pip_binary = "/usr/local/bin/pip"
34
34
end
35
35
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
- source node [ 'python' ] [ 'distribute_script_url' ]
36
+ remote_file "#{ Chef ::Config [ :file_cache_path ] } /ez_setup.py" do
37
+ source node [ '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
+ source node [ 'python' ] [ 'pip_script_url' ]
42
44
mode "0644"
43
45
not_if { ::File . exists? ( pip_binary ) }
44
46
end
45
47
48
+ execute "install-setuptools" do
49
+ cwd Chef ::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
+
46
56
execute "install-pip" do
47
57
cwd Chef ::Config [ :file_cache_path ]
48
58
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
51
60
EOF
52
61
not_if { ::File . exists? ( pip_binary ) }
53
62
end
You can’t perform that action at this time.
0 commit comments