Skip to content

Commit 4618d48

Browse files
committed
centos7-ppc64: build python 3.7 from source
Installs python3 in /usr/local/bin, as python3.7: % python3.7 --version Python 3.7.3 PR-URL: #1807
1 parent 617b2b6 commit 4618d48

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

ansible/roles/baselayout/tasks/partials/repo/centos7.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,37 @@
3939
url: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo"
4040
dest: "/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo"
4141
mode: 0644
42+
43+
- stat: path=/usr/local/bin/python3.7
44+
register: build_python37
45+
46+
- name: centos7 | ppc64 | download python 3.7
47+
get_url:
48+
url: https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
49+
dest: /tmp/
50+
when: "arch == 'ppc64' and build_python37.stat.exists == False"
51+
52+
- name: centos7 | ppc64 | unarchive python 3.7
53+
unarchive:
54+
src: /tmp/Python-3.7.3.tgz
55+
remote_src: yes
56+
dest: /tmp/
57+
when: "arch == 'ppc64' and build_python37.stat.exists == False"
58+
59+
- name: centos7 | ppc64 | configure python 3.7
60+
shell: /tmp/Python-3.7.3/configure
61+
args:
62+
chdir: /tmp/Python-3.7.3
63+
when: "arch == 'ppc64' and build_python37.stat.exists == False"
64+
65+
- name: centos7 | ppc64 | install python 3.7
66+
shell: make -j6 install
67+
args:
68+
chdir: /tmp/Python-3.7.3
69+
when: "arch == 'ppc64' and build_python37.stat.exists == False"
70+
71+
- name: centos7 | ppc64 | clean python 3.7
72+
file:
73+
state: absent
74+
path: /tmp/Python-3.7
75+
when: "arch == 'ppc64' and build_python37.stat.exists == False"

ansible/roles/baselayout/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ packages: {
4444
centos7_x64: ['git2u','centos-release-scl',], # centos-release-scl is required to enable SCLo
4545
# but we do it manually in partials/repo/centos7.yml for arm64
4646
centos7: [
47-
'ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel',
47+
'ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel,zlib-devel,libffi-devel',
4848
],
4949

5050
aix: [

0 commit comments

Comments
 (0)