File tree Expand file tree Collapse file tree 6 files changed +45
-4
lines changed
Expand file tree Collapse file tree 6 files changed +45
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,19 @@ pip install tox
6262tox
6363` ` `
6464
65+ For testing specific distributions and python versions, .e.g. :
66+
67+ ` ` ` bash
68+ MOLECULE_DISTRO=centos8 MOLECULE_PYTHON_VERSION=3.8 tox
69+ ` ` `
70+
71+ To manually inspect a container, you can run the converge and destroy steps individually :
72+
73+ ` ` ` bash
74+ tox converge
75+ tox destroy
76+ ` ` `
77+
6578# # Code style
6679
6780Code style is formatted and linted with [pre-commit](https://pre-commit.com/).
Original file line number Diff line number Diff line change @@ -6,3 +6,6 @@ python_venv_packages:
66- pip
77- setuptools
88- wheel
9+
10+ # Install the Tk GUI toolkit (see https://docs.python.org/3/library/tkinter.html)
11+ python_install_tk : false
Original file line number Diff line number Diff line change 11- name : Converge
22 hosts : all
33
4- vars :
5- - run_tests : true
6- - ansible_python_interpreter : /usr/bin/python3
7-
84 roles :
95 - role : " marvel-nccr.python"
Original file line number Diff line number Diff line change @@ -31,5 +31,8 @@ provisioner:
3131 hosts :
3232 all :
3333 vars :
34+ ansible_python_interpreter : /usr/bin/python3
3435 python_base_version : " ${MOLECULE_PYTHON_VERSION:-3.7}"
3536 python_venv_path : /tmp/test_venv
37+ python_install_tk : true
38+ run_tests : true
Original file line number Diff line number Diff line change 3030- name : Install distutils
3131 when : ansible_distribution_major_version|int == 18
3232 become : true
33+ become_user : " {{ root_user }}"
3334 apt :
3435 name :
3536 - python{{ python_base_version }}-distutils
37+
38+ - name : Install Tk GUI toolkit for python{{ python_base_version }}
39+ when : python_install_tk|bool
40+ become : true
41+ become_user : " {{ root_user }}"
42+ apt :
43+ name :
44+ - python{{ python_base_version }}-tk
Original file line number Diff line number Diff line change 66 name :
77 - python{{ python_base_version | replace('.', '') }}
88 - wget
9+
10+ - name : install tkinter
11+ when : python_install_tk|bool
12+ block :
13+ - name : Install Tk GUI toolkit for python{{ python_base_version | replace('.', '') }}
14+ become : true
15+ become_user : " {{ root_user }}"
16+ yum :
17+ name :
18+ - python{{ python_base_version | replace('.', '') }}-tkinter # TODO this may not be correct
19+ rescue :
20+ - name : Install Tk GUI toolkit for python3 (fallback)
21+ become : true
22+ become_user : " {{ root_user }}"
23+ yum :
24+ name :
25+ - python3-tkinter
You can’t perform that action at this time.
0 commit comments