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

Commitbb17707

Browse files
author
Joshua Timberman
committed
Merge pull requestpoise#2 from hectcastro/COOK-1169
[COOK-1169] python::pip recipe failure because it's looking for Python in the wrong directory
2 parentsa5cce1a +3b087b8 commitbb17707

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

‎attributes/default.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@
1919
#
2020

2121
default['python']['install_method']='package'
22-
default['python']['prefix_dir']='/usr/local'
22+
23+
ifpython['install_method'] =='package'
24+
default['python']['prefix_dir']='/usr'
25+
else
26+
default['python']['prefix_dir']='/usr/local'
27+
end
28+
2329
default['python']['url']='http://www.python.org/ftp/python'
2430
default['python']['version']='2.7.1'
2531
default['python']['checksum']='80e387bcf57eae8ce26726753584fd63e060ec11682d1145af921e85fd612292'
2632
default['python']['configure_options']=%W{--prefix=#{python['prefix_dir']}}
33+
34+
default['python']['pip']['prefix_dir']='/usr/local'

‎recipes/pip.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
# limitations under the License.
1919
#
2020

21-
python_bindir="#{node['python']['prefix_dir']}/bin/"
21+
python_bindir="#{node['python']['prefix_dir']}/bin"
22+
pip_bindir="#{node['python']['pip']['prefix_dir']}/bin"
2223

2324
# Ubuntu's python-setuptools, python-pip and python-virtualenv packages
2425
# are broken...this feels like Rubygems!
@@ -27,14 +28,14 @@
2728
remote_file"#{Chef::Config[:file_cache_path]}/distribute_setup.py"do
2829
source"http://python-distribute.org/distribute_setup.py"
2930
mode"0644"
30-
not_if{ ::File.exists?(python_bindir+'pip')}
31+
not_if{ ::File.exists?("#{pip_bindir}/pip")}
3132
end
3233

3334
bash"install-pip"do
3435
cwdChef::Config[:file_cache_path]
3536
code<<-EOF
36-
#{python_bindir}python distribute_setup.py
37-
#{python_bindir}easy_install pip
37+
#{python_bindir}/python distribute_setup.py
38+
#{pip_bindir}/easy_install pip
3839
EOF
39-
not_if{ ::File.exists?(python_bindir+'pip')}
40+
not_if{ ::File.exists?("#{pip_bindir}/pip")}
4041
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp