diff --git a/.travis/preinstall b/.travis/preinstall index 4e4f53a..14445bd 100755 --- a/.travis/preinstall +++ b/.travis/preinstall @@ -20,6 +20,11 @@ if lsr_venv_python_matches_system_python; then LSR_EXTRA_PACKAGES='python3-selinux' fi +# extra packages needed with python 2.6 and ansible 2.6 +if lsr_check_python_version python -lt 2.7 ; then + LSR_EXTRA_PACKAGES="$LSR_EXTRA_PACKAGES libffi-dev libssl-dev" +fi + . ${SCRIPTDIR}/config.sh # Install extra dependencies. diff --git a/ansible_pytest_extra_requirements.txt b/ansible_pytest_extra_requirements.txt new file mode 100644 index 0000000..0d79ed5 --- /dev/null +++ b/ansible_pytest_extra_requirements.txt @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT + +# ansible and dependencies for all supported platforms +ansible ; python_version > "2.6" +ansible<2.7 ; python_version < "2.7" +idna<2.8 ; python_version < "2.7" +PyYAML<5.1 ; python_version < "2.7" diff --git a/pytest_extra_requirements.txt b/pytest_extra_requirements.txt new file mode 100644 index 0000000..0d8bceb --- /dev/null +++ b/pytest_extra_requirements.txt @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT + +# Write extra requirements for running pytest here: +# If you need ansible then uncomment the following line: +#-ransible_pytest_extra_requirements.txt +# If you need mock then uncomment the following line: +mock ; python_version < "3.0" diff --git a/tox.ini b/tox.ini index 27d5671..c7716e2 100644 --- a/tox.ini +++ b/tox.ini @@ -13,8 +13,8 @@ basepython = python3 deps = py{26,27,36,37,38}: pytest-cov py{27,36,37,38}: pytest>=3.5.1 - py{26,27}: mock py26: pytest + py{26,27,36,37,38}: -rpytest_extra_requirements.txt [base] passenv = *