From 9b44e5a66ec5f29c30962600ebf8b4bec6fd05e4 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Thu, 9 Sep 2021 19:22:00 +0300 Subject: [PATCH] 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 --- dev-python/PyUtilib/PyUtilib-6.0.0.ebuild | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dev-python/PyUtilib/PyUtilib-6.0.0.ebuild b/dev-python/PyUtilib/PyUtilib-6.0.0.ebuild index d0f3e6c388551..fe1c027f23dac 100644 --- a/dev-python/PyUtilib/PyUtilib-6.0.0.ebuild +++ b/dev-python/PyUtilib/PyUtilib-6.0.0.ebuild @@ -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 }