File tree 8 files changed +53
-22
lines changed
8 files changed +53
-22
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ services: docker
3
3
4
4
env :
5
5
- distro : ubuntu1404
6
+ - distro : ubuntu1804
6
7
7
8
script :
8
9
# Run tests.
Original file line number Diff line number Diff line change @@ -28,21 +28,9 @@ python_pip_prefix: '/usr/local'
28
28
python_pip_path : " {{python_pip_prefix}}/bin/pip{{python_major_version}}"
29
29
python_tar_dir : " Python-{{python_version}}"
30
30
python_tar_url : " https://www.python.org/ftp/python/{{python_version}}/{{python_tar_dir}}.tgz"
31
- python_dependencies :
32
- - build-essential
33
- - libbz2-dev
34
- - libdb-dev
35
- - libexpat1-dev
36
- - libffi-dev
37
- - libgdbm-dev
38
- - liblzma-dev
39
- - libncurses-dev
40
- - libreadline-dev
41
- - libsqlite3-dev
42
- - libssl-dev
43
- - python-dev
44
- - tk-dev
45
- - zlib1g-dev
46
31
47
32
# Needed to get around restrictive umask on CIS-supplied images. Setting to Ubuntu default of 0022.
48
33
python_pip_umask : ' 0022'
34
+ python_pip_module_opts : --default-pip
35
+
36
+ python_build_opts : --with-zlib-dir=/lib
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ galaxy_info:
8
8
platforms :
9
9
- name : Ubuntu
10
10
versions :
11
+ - bionic
11
12
- trusty
12
13
13
14
galaxy_tags :
Original file line number Diff line number Diff line change 1
1
---
2
2
3
+ - name : Include dist dependency vars
4
+ include_vars :
5
+ file : " {{ansible_distribution_release}}.yml"
6
+ when : python_dependencies is not defined
7
+
3
8
- name : Install dependencies
4
9
apt : name="{{item}}" update_cache=yes cache_valid_time=86400
5
10
with_items : " {{python_dependencies}}"
14
19
file : path="{{python_configure_prefix}}" state=directory
15
20
16
21
- name : Build python
17
- shell : " ./configure --prefix={{python_configure_prefix}}; make; make install"
22
+ shell : " ./configure --prefix={{python_configure_prefix}} {{python_build_opts}} ; make; make install"
18
23
args :
19
24
chdir : " /tmp/{{python_tar_dir}}"
Original file line number Diff line number Diff line change 2
2
- name : Install python3-distutils
3
3
package :
4
4
name : python3-distutils
5
- when : ansible_distribution_release == 'bionic'
5
+ when : ansible_distribution_major_version|int >= 16
6
6
7
- - name : Download get-pip.py
8
- get_url : url=https://bootstrap.pypa.io/get-pip.py dest=/tmp/
9
7
10
- - name : Install pip
11
- command : " {{python_path}} /tmp/get-pip.py"
8
+ - name : Install Pip
9
+ block :
10
+ - name : Module Install
11
+ command : " {{python_path}} -m ensurepip {{python_pip_module_opts}}"
12
+ rescue :
13
+ - name : Download get-pip
14
+ get_url : url=https://bootstrap.pypa.io/get-pip.py dest=/tmp/
15
+ - name : Run get-pip
16
+ command : " {{python_path}} /tmp/get-pip.py"
Original file line number Diff line number Diff line change 34
34
# Install packages
35
35
- name : Install virtualenv
36
36
pip : name=virtualenv executable="{{python_pip_path}}" umask="{{python_pip_umask}}"
37
- when : python_major_version == '2'
38
37
39
38
- name : Install global packages
40
39
pip : name="{{item}}" state=present executable="{{python_pip_path}}" umask="{{python_pip_umask}}"
Original file line number Diff line number Diff line change
1
+ ---
2
+ python_dependencies :
3
+ - build-essential
4
+ - libbz2-1.0
5
+ - libc6
6
+ - libdb5.3
7
+ - libexpat1
8
+ - libffi6
9
+ - libncursesw5
10
+ - libreadline7
11
+ - libsqlite3-0
12
+ - libssl1.0.0
13
+ - libssl1.0-dev
14
+ - libtinfo5
15
+ - mime-support
16
+ - zlib1g
17
+ - zlib1g-dev
Original file line number Diff line number Diff line change
1
+ python_dependencies :
2
+ - build-essential
3
+ - libbz2-dev
4
+ - libdb-dev
5
+ - libexpat1-dev
6
+ - libffi-dev
7
+ - libgdbm-dev
8
+ - liblzma-dev
9
+ - libncurses-dev
10
+ - libreadline-dev
11
+ - libsqlite3-dev
12
+ - libssl-dev
13
+ - python-dev
14
+ - tk-dev
15
+ - zlib1g-dev
You can’t perform that action at this time.
0 commit comments