commit: a8051b0ca978646439af76fdc74f3609c388d04f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 4 18:17:07 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 4 18:45:28 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8051b0c
dev-lang/python: Backport docutils test hack
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-lang/python/python-3.10.8_p2.ebuild | 14 ++++++++++++--
dev-lang/python/python-3.8.15_p2.ebuild | 14 ++++++++++++--
dev-lang/python/python-3.9.15_p2.ebuild | 14 ++++++++++++--
3 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/dev-lang/python/python-3.10.8_p2.ebuild
b/dev-lang/python/python-3.10.8_p2.ebuild
index 48050825327e..b1ce528e225d 100644
--- a/dev-lang/python/python-3.10.8_p2.ebuild
+++ b/dev-lang/python/python-3.10.8_p2.ebuild
@@ -360,14 +360,24 @@ src_test() {
)
fi
+ # workaround docutils breaking tests
+ cat > Lib/docutils.py <<-EOF || die
+ raise ImportError("Thou shalt not import!")
+ EOF
+
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite "/usr/lib/python${PYVER}/site-packages"
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
+ nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local ret=${?}
+
+ rm Lib/docutils.py || die
+
+ [[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
diff --git a/dev-lang/python/python-3.8.15_p2.ebuild
b/dev-lang/python/python-3.8.15_p2.ebuild
index c45c62c2e163..f03d22173cd6 100644
--- a/dev-lang/python/python-3.8.15_p2.ebuild
+++ b/dev-lang/python/python-3.8.15_p2.ebuild
@@ -297,12 +297,22 @@ src_test() {
)
fi
+ # workaround docutils breaking tests
+ cat > Lib/docutils.py <<-EOF || die
+ raise ImportError("Thou shalt not import!")
+ EOF
+
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
+ nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local ret=${?}
+
+ rm Lib/docutils.py || die
+
+ [[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
diff --git a/dev-lang/python/python-3.9.15_p2.ebuild
b/dev-lang/python/python-3.9.15_p2.ebuild
index 2f8b9cad109e..d5d9a2e273eb 100644
--- a/dev-lang/python/python-3.9.15_p2.ebuild
+++ b/dev-lang/python/python-3.9.15_p2.ebuild
@@ -354,12 +354,22 @@ src_test() {
)
fi
+ # workaround docutils breaking tests
+ cat > Lib/docutils.py <<-EOF || die
+ raise ImportError("Thou shalt not import!")
+ EOF
+
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
- emake test EXTRATESTOPTS="${test_opts[*]}" \
- CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty || die "emake test failed"
+ nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \
+ CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local ret=${?}
+
+ rm Lib/docutils.py || die
+
+ [[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {