commit: 342cce472571151b17ec2c2d4191ac74cb3b4cbb Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Thu Dec 24 02:21:02 2020 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Thu Dec 24 02:21:02 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=342cce47
net-libs/serf: backport python3 fixes in check.py Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> net-libs/serf/files/serf-1.3.9-python3-check.patch | 74 ++++++++++++++++++++++ net-libs/serf/serf-1.3.9-r2.ebuild | 1 + 2 files changed, 75 insertions(+) diff --git a/net-libs/serf/files/serf-1.3.9-python3-check.patch b/net-libs/serf/files/serf-1.3.9-python3-check.patch new file mode 100644 index 00000000000..fbbfe36fefe --- /dev/null +++ b/net-libs/serf/files/serf-1.3.9-python3-check.patch @@ -0,0 +1,74 @@ +From 05eae144c6b3ed85f0829de6278a8f89505506f0 Mon Sep 17 00:00:00 2001 +From: Bert Huijben <[email protected]> +Date: Mon, 2 Nov 2015 17:50:29 +0000 +Subject: [PATCH] * build/check.py Print a bit more information about the + failed test. The returncode might be interesting to track down signal + problems. + +git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1712098 13f79535-47bb-0310-9956-ffa450edef68 +--- + build/check.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/build/check.py b/build/check.py +index fc49d336..75287016 100755 +--- a/build/check.py ++++ b/build/check.py +@@ -55,13 +55,13 @@ + print "== Testing %s ==" % (case) + try: + subprocess.check_call([SERF_RESPONSE_EXE, case]) +- except subprocess.CalledProcessError: +- print "ERROR: test case %s failed" % (case) ++ except subprocess.CalledProcessError, x: ++ print "ERROR: test failed in '%s', exit code=%d" % (x.cmd, x.returncode) + sys.exit(1) + + print "== Running the unit tests ==" + try: + subprocess.check_call(TEST_ALL_EXE) +- except subprocess.CalledProcessError: +- print "ERROR: test(s) failed in test_all" ++ except subprocess.CalledProcessError, x: ++ print "ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode) + sys.exit(1) +From 773a2ee2ca7a48dd8356707fa6774afcf5b85470 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Branko=20=C4=8Cibej?= <[email protected]> +Date: Sat, 9 Jun 2018 08:10:10 +0000 +Subject: [PATCH] Make the tests run with Python 3.x. + +* build/check.py: Add parentheses around 'print' statement arguments + so that they work when 'print' is a function. + +git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1833223 13f79535-47bb-0310-9956-ffa450edef68 +--- + build/check.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/build/check.py b/build/check.py +index 75287016..e05760f9 100755 +--- a/build/check.py ++++ b/build/check.py +@@ -52,16 +52,16 @@ + + # Find test responses and run them one by one + for case in glob.glob(testdir + "/testcases/*.response"): +- print "== Testing %s ==" % (case) ++ print("== Testing %s ==" % (case)) + try: + subprocess.check_call([SERF_RESPONSE_EXE, case]) +- except subprocess.CalledProcessError, x: +- print "ERROR: test failed in '%s', exit code=%d" % (x.cmd, x.returncode) ++ except subprocess.CalledProcessError as x: ++ print("ERROR: test failed in '%s', exit code=%d" % (x.cmd, x.returncode)) + sys.exit(1) + +- print "== Running the unit tests ==" ++ print("== Running the unit tests ==") + try: + subprocess.check_call(TEST_ALL_EXE) +- except subprocess.CalledProcessError, x: +- print "ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode) ++ except subprocess.CalledProcessError as x: ++ print("ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode)) + sys.exit(1) diff --git a/net-libs/serf/serf-1.3.9-r2.ebuild b/net-libs/serf/serf-1.3.9-r2.ebuild index e0703ec1591..be4abc15606 100644 --- a/net-libs/serf/serf-1.3.9-r2.ebuild +++ b/net-libs/serf/serf-1.3.9-r2.ebuild @@ -29,6 +29,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.3.8-static-lib.patch "${FILESDIR}"/${PN}-1.3.8-openssl.patch "${FILESDIR}"/${PN}-1.3.9-python3.patch "${FILESDIR}"/${PN}-1.3.9-python3_byte.patch + "${FILESDIR}"/${PN}-1.3.9-python3-check.patch "${FILESDIR}"/${PN}-1.3.9-libressl.patch ) src_prepare() {
