dev-python/PyUtilib: enable py3.10, add missing deps

Needed to fix a very small and irrelevant part of tests, which check
exact output of --help output. In python 3.10 it changed the texts,
so those fails are failing now. Fix by using sed and change only for
python 3.10 the expected output.

Closes: https://bugs.gentoo.org/812269
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Arthur Zamarin
2021-09-09 19:22:00 +03:00
parent 9079d7adfc
commit 9b44e5a66e

View File

@@ -3,8 +3,7 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_IN_SOURCE_BUILD=1
inherit distutils-r1
@@ -18,6 +17,9 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
BDEPEND="test? ( dev-python/nose[${PYTHON_USEDEP}] )"
PATCHES=(
"${FILESDIR}/PyUtilib-6.0.0-tests.patch"
)
@@ -36,5 +38,12 @@ python_test() {
local -x PYTHONPATH="${PWD}:${TEST_DIR}/lib" \
COLUMNS=80
if [[ ${EPYTHON} == python3.10 ]]; then
# Fix for very small output change of expected output in new version
sed -e 's/optional arguments/options/' -i \
"${BUILD_DIR}/../doc/workflow/examples/"*.txt \
pyutilib/misc/tests/test_config.py || die
fi
eunittest
}