]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3-testtools: Avoid traceback2 module requirement
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Nov 2019 12:08:55 +0000 (12:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Sep 2020 09:06:57 +0000 (10:06 +0100)
traceback2 adds traceback for python2. Rather than depend on traceback2, we're
python3 only so just use traceback.

This caused breakage in oe-selftest -j which uses testtools on the autobuilder
using buildtools-tarball.

[YOCTO #13652]

(From OE-Core rev: ee80a06c107375e3cf0d246ea17c09dda4536dab)

(From OE-Core rev: ee82e3c24fe5727ce81e972cadedca431d6086c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3-testtools/no_traceback2.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3-testtools_2.3.0.bb

diff --git a/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch b/meta/recipes-devtools/python/python3-testtools/no_traceback2.patch
new file mode 100644 (file)
index 0000000..5945103
--- /dev/null
@@ -0,0 +1,23 @@
+traceback2 adds traceback for python2. Rather than depend on traceback2, we're
+python3 only so just use traceback.
+This caused breakage in oe-selftest -j which uses testtools on the autobuilder
+using buildtools-tarball.
+
+Upstream-Status: Inappropriate [Our recipe is python3 specific]
+(Once py2 is EOL upstream probably could/should take this)
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: testtools-2.3.0/testtools/content.py
+===================================================================
+--- testtools-2.3.0.orig/testtools/content.py
++++ testtools-2.3.0/testtools/content.py
+@@ -19,8 +19,7 @@ import os
+ import sys
+ from extras import try_import
+-# To let setup.py work, make this a conditional import.
+-traceback = try_import('traceback2')
++import traceback
+ from testtools.compat import (
+     _b,
index 896ecee65c5fc490e5776b7cae1ff3e9a42d804c..a254b90a758481d287d124acde9e1511459d7f90 100644 (file)
@@ -1,2 +1,4 @@
 inherit setuptools3
 require python-testtools.inc
+
+SRC_URI += "file://no_traceback2.patch"