commit:     1f83cc2bc2ef20a1df3012035b97630fa570c6d2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  4 08:36:58 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar  4 11:19:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f83cc2b

dev-python/pathlib2: Fix tests not to use broken private API

 dev-python/pathlib2/pathlib2-2.3.0.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dev-python/pathlib2/pathlib2-2.3.0.ebuild 
b/dev-python/pathlib2/pathlib2-2.3.0.ebuild
index 7f4dcb53ace..1a09a8dd7c8 100644
--- a/dev-python/pathlib2/pathlib2-2.3.0.ebuild
+++ b/dev-python/pathlib2/pathlib2-2.3.0.ebuild
@@ -24,6 +24,14 @@ DEPEND="${RDEPEND}
        dev-python/setuptools[${PYTHON_USEDEP}]
        test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' -2) )"
 
+python_prepare_all() {
+       # stop using private Python API
+       # https://github.com/mcmtroffaes/pathlib2/issues/39
+       sed -i -e 's/support\.android_not_root/False/' test*.py || die
+
+       distutils-r1_python_prepare_all
+}
+
 python_test() {
        "${EPYTHON}" test_pathlib2.py -v || die
        "${EPYTHON}" test_pathlib2_with_py2_unicode_literals.py -v || die

Reply via email to