File tree Expand file tree Collapse file tree 2 files changed +7
-27
lines changed Expand file tree Collapse file tree 2 files changed +7
-27
lines changed Original file line number Diff line number Diff line change 39
39
not_if { ::File . exists? ( pip_binary ) }
40
40
end
41
41
42
+ #because the latest version of the get-pip.py script requires >=python3.7, this is now hardcoded to the 3.6 version as recommended by pypa.io
42
43
execute "install-pip" do
43
44
cwd Chef ::Config [ :file_cache_path ]
44
45
command <<-EOF
Original file line number Diff line number Diff line change 1
- # apt_repository "python3" do
2
- # uri 'http://ppa.launchpad.net/deadsnakes/ppa/ubuntu'
3
- # components ['trusty main']
4
- # end
5
-
1
+ #Add in the deadsnakes ppa repository to app
2
+ #note the fkrull/deadsnakes url is correct for Ubuntu 14.04. For higher versions of Ubuntu (>16.0), this is instead "ppa:deadsnakes/ppa"
6
3
bash 'add deadsnakes ppa' do
7
4
code <<-EOH
8
5
sudo add-apt-repository ppa:fkrull/deadsnakes -y;
9
6
EOH
10
7
flags "-x"
11
8
end
12
9
10
+ #Update the apt repository list
13
11
bash 'update apt-get repos' do
14
12
code <<-EOH
15
13
sudo apt update;
16
14
EOH
17
15
flags "-x"
18
16
end
19
17
18
+ #install python3.6 and python3.6-dev via apt
19
+ #note that this is using the fkrull/deadsnakes repository listed above
20
20
bash 'install python3.6' do
21
21
code <<-EOH
22
22
sudo apt install python3.6 python3.6-dev -y;
23
23
EOH
24
24
flags "-x"
25
- end
26
-
27
- # execute "update" do
28
- # command 'sudo apt-get update'
29
- # end
30
-
31
- # package 'python3.6' do
32
- # options '--force-yes'
33
- # action :install
34
- # end
35
-
36
- # package 'python3.6-dev' do
37
- # options '--force-yes'
38
- # action :install
39
- # end
40
-
41
- # alternatives 'python-set-version-3' do
42
- # link_name 'python3'
43
- # path '/opt/python/3.6/bin/python3.6'
44
- # priority 100
45
- # action :install
46
- # end
25
+ end
You can’t perform that action at this time.
0 commit comments