Skip to content

Commit

Permalink
dev-python/PyUtilib: enable py3.10, add missing deps
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
arthurzam committed Sep 9, 2021
1 parent 9079d7a commit 9b44e5a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dev-python/PyUtilib/PyUtilib-6.0.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
)
Expand All @@ -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
}

0 comments on commit 9b44e5a

Please sign in to comment.