Skip to content

Commit

Permalink
centos7-ppc64: build python 3.7 from source
Browse files Browse the repository at this point in the history
Installs python3 in /usr/local/bin, as python3.7:

	% python3.7 --version
	Python 3.7.3

PR-URL: #1807
  • Loading branch information
sam-github committed Jul 2, 2019
1 parent 617b2b6 commit 4618d48
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions ansible/roles/baselayout/tasks/partials/repo/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,37 @@
url: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo"
dest: "/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo"
mode: 0644

- stat: path=/usr/local/bin/python3.7
register: build_python37

- name: centos7 | ppc64 | download python 3.7
get_url:
url: https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
dest: /tmp/
when: "arch == 'ppc64' and build_python37.stat.exists == False"

- name: centos7 | ppc64 | unarchive python 3.7
unarchive:
src: /tmp/Python-3.7.3.tgz
remote_src: yes
dest: /tmp/
when: "arch == 'ppc64' and build_python37.stat.exists == False"

- name: centos7 | ppc64 | configure python 3.7
shell: /tmp/Python-3.7.3/configure
args:
chdir: /tmp/Python-3.7.3
when: "arch == 'ppc64' and build_python37.stat.exists == False"

- name: centos7 | ppc64 | install python 3.7
shell: make -j6 install
args:
chdir: /tmp/Python-3.7.3
when: "arch == 'ppc64' and build_python37.stat.exists == False"

- name: centos7 | ppc64 | clean python 3.7
file:
state: absent
path: /tmp/Python-3.7
when: "arch == 'ppc64' and build_python37.stat.exists == False"
2 changes: 1 addition & 1 deletion ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ packages: {
centos7_x64: ['git2u','centos-release-scl',], # centos-release-scl is required to enable SCLo
# but we do it manually in partials/repo/centos7.yml for arm64
centos7: [
'ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel',
'ccache,gcc-c++,devtoolset-6,sudo,git,devtoolset-6-libatomic-devel,zlib-devel,libffi-devel',
],

aix: [
Expand Down

0 comments on commit 4618d48

Please sign in to comment.