python 2.6 support for pytest and ansible 2.6

Removed `mock` from the `testenv` `deps`.
Added `mock` to the template pytest_extra_requirements.txt,
commented out.  Projects such as network that need it can uncomment it.
This commit is contained in:
Rich Megginson 2020-04-01 14:53:47 -06:00 committed by Till Maas
parent 7fdfa3204e
commit 92519644ba
4 changed files with 20 additions and 1 deletions

View file

@ -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.

View file

@ -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"

View file

@ -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"

View file

@ -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 = *