You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by wo...@apache.org on 2017/03/24 04:18:24 UTC

couchdb-ci git commit: Fix Centos 6 build (using Python 3)

Repository: couchdb-ci
Updated Branches:
  refs/heads/master a074a6842 -> 9cfaff61b


Fix Centos 6 build (using Python 3)


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/9cfaff61
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/9cfaff61
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/9cfaff61

Branch: refs/heads/master
Commit: 9cfaff61b228e8fa8102b8e9d26fb0d88aa43c17
Parents: a074a68
Author: Joan Touzet <wo...@apache.org>
Authored: Thu Mar 23 20:53:33 2017 -0700
Committer: Joan Touzet <wo...@apache.org>
Committed: Thu Mar 23 20:53:33 2017 -0700

----------------------------------------------------------------------
 .../roles/dependencies-centos/tasks/main.yml    | 37 +++++++++++++++++---
 1 file changed, 32 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9cfaff61/ansible/roles/dependencies-centos/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/dependencies-centos/tasks/main.yml b/ansible/roles/dependencies-centos/tasks/main.yml
index f40221e..d9367a1 100644
--- a/ansible/roles/dependencies-centos/tasks/main.yml
+++ b/ansible/roles/dependencies-centos/tasks/main.yml
@@ -58,11 +58,38 @@
 - include: shunit.yml
 
 # required for make docs
-- name: install packages required to build CouchDB
-  yum: name={{item}} state=present
-  with_items:
-  - help2man
-  - python-pip
+- name: install packages required to build CouchDB docs
+  yum:
+    name: help2man
+    state: present
+
+- name: install system-wide pip on CentOS >= 7
+  when: ansible_distribution == 'CentOS' and ansible_distribution_major_version > '6'
+  yum:
+    name: python-pip
+    state: present
+
+# CentOS 6 needs a new python
+- name: install Python 3.4 for CentOS 6
+  when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
+  yum:
+    name: python34
+    state: present
+
+# Symlink it to override system python
+- name: Symlink /usr/bin/python3.4 to /usr/local/bin/python
+  when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
+  command: ln -s /usr/bin/python3.4 /usr/local/bin/python
+
+- name: retrieve pip installer for Python 3.4
+  when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
+  command: "wget https://bootstrap.pypa.io/get-pip.py"
+  args:
+    chdir: /tmp
+
+- name: install pip for Python 3.4
+  when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '6'
+  command: "/usr/bin/python3.4 /tmp/get-pip.py"
 
 - name: install up to date version of sphinx via pip
   shell: pip install sphinx==1.5.3