summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2019-03-04 09:56:45 -0500
committerMike Gilbert <floppym@gentoo.org>2019-03-04 09:56:45 -0500
commit9f8c659431bbe554bbe96cb074c9e3fe957b72ce (patch)
treefdbcb3afc8694b1157fbaf97f0b44b98e34f83f5 /dev-util/meson
parentnet-p2p/xmr-stak: 2.9.0 version bump (diff)
downloadgentoo-9f8c659431bbe554bbe96cb074c9e3fe957b72ce.tar.gz
gentoo-9f8c659431bbe554bbe96cb074c9e3fe957b72ce.tar.bz2
gentoo-9f8c659431bbe554bbe96cb074c9e3fe957b72ce.zip
dev-util/meson: backport Python 3.5 tests fix
Package-Manager: Portage-2.3.59_p2, Repoman-2.3.12_p67 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-util/meson')
-rw-r--r--dev-util/meson/files/meson-0.49-python3.5-tests.patch34
-rw-r--r--dev-util/meson/meson-0.49.2.ebuild9
-rw-r--r--dev-util/meson/meson-9999.ebuild5
3 files changed, 38 insertions, 10 deletions
diff --git a/dev-util/meson/files/meson-0.49-python3.5-tests.patch b/dev-util/meson/files/meson-0.49-python3.5-tests.patch
new file mode 100644
index 00000000000..640348b2bc2
--- /dev/null
+++ b/dev-util/meson/files/meson-0.49-python3.5-tests.patch
@@ -0,0 +1,34 @@
+From 65192af2ff62a032a3f19d065c95e12b83aae709 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Fri, 11 Jan 2019 18:03:15 +0000
+Subject: [PATCH] run_unittests: Use Python 3.5-compatible subprocess
+ invocation
+
+subprocess.run() didn't get the encoding parameter until 3.6.
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+---
+ run_unittests.py | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/run_unittests.py b/run_unittests.py
+index 342ad883..e1246140 100755
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -5029,10 +5029,9 @@ class NativeFileTests(BasePlatformTests):
+ ret = subprocess.run(
+ ["{}"] + extra_args,
+ stdout=subprocess.PIPE,
+- stderr=subprocess.PIPE,
+- encoding='utf-8')
+- print(ret.stdout)
+- print(ret.stderr, file=sys.stderr)
++ stderr=subprocess.PIPE)
++ print(ret.stdout.decode('utf-8'))
++ print(ret.stderr.decode('utf-8'), file=sys.stderr)
+ sys.exit(ret.returncode)
+
+ if __name__ == '__main__':
+--
+2.21.0
+
diff --git a/dev-util/meson/meson-0.49.2.ebuild b/dev-util/meson/meson-0.49.2.ebuild
index af2f0b75de8..09b40845cc6 100644
--- a/dev-util/meson/meson-0.49.2.ebuild
+++ b/dev-util/meson/meson-0.49.2.ebuild
@@ -33,6 +33,10 @@ DEPEND="${RDEPEND}
)
"
+PATCHES=(
+ "${FILESDIR}/meson-0.49-python3.5-tests.patch"
+)
+
python_prepare_all() {
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
@@ -51,11 +55,6 @@ src_test() {
}
python_test() {
- if [[ ${EPYTHON} == python3.5 ]]; then
- ewarn "Skipping tests with ${EPYTHON}"
- return 0
- fi
-
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-9999.ebuild
index af2f0b75de8..89b176910cb 100644
--- a/dev-util/meson/meson-9999.ebuild
+++ b/dev-util/meson/meson-9999.ebuild
@@ -51,11 +51,6 @@ src_test() {
}
python_test() {
- if [[ ${EPYTHON} == python3.5 ]]; then
- ewarn "Skipping tests with ${EPYTHON}"
- return 0
- fi
-
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE